diff options
author | dbj <dbj@pkgsrc.org> | 2017-10-31 08:12:11 +0000 |
---|---|---|
committer | dbj <dbj@pkgsrc.org> | 2017-10-31 08:12:11 +0000 |
commit | 08fa5d062fa77a662e68fe617369217eb04d084a (patch) | |
tree | bfceb163c301c0f33a7702376eed42df64233b21 /print | |
parent | 20af63c46cc12f8975443dd180d8a83d1c20bdf9 (diff) | |
download | pkgsrc-08fa5d062fa77a662e68fe617369217eb04d084a.tar.gz |
fix runtime abort when building with recent clang
Diffstat (limited to 'print')
-rw-r--r-- | print/dvipsk/Makefile | 3 | ||||
-rw-r--r-- | print/dvipsk/distinfo | 3 | ||||
-rw-r--r-- | print/dvipsk/patches/patch-texk_dvipsk_color.c | 29 |
3 files changed, 33 insertions, 2 deletions
diff --git a/print/dvipsk/Makefile b/print/dvipsk/Makefile index 623b89dea5b..415b8a9fea2 100644 --- a/print/dvipsk/Makefile +++ b/print/dvipsk/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.17 2017/09/06 16:49:29 wiz Exp $ +# $NetBSD: Makefile,v 1.18 2017/10/31 08:12:11 dbj Exp $ DISTNAME= texlive-20170524-source PKGNAME= dvipsk-5.997 +PKGREVISION= 1 CATEGORIES= print MASTER_SITES= ftp://tug.org/historic/systems/texlive/2017/ EXTRACT_SUFX= .tar.xz diff --git a/print/dvipsk/distinfo b/print/dvipsk/distinfo index 7c12cbb78b8..cbfb87640ad 100644 --- a/print/dvipsk/distinfo +++ b/print/dvipsk/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.14 2017/06/20 20:50:50 markd Exp $ +$NetBSD: distinfo,v 1.15 2017/10/31 08:12:11 dbj Exp $ SHA1 (texlive-20170524-source.tar.xz) = 1c1383ddb1b871c6b8ce49a4ae3c1a33d454a7b6 RMD160 (texlive-20170524-source.tar.xz) = a8430c19fe1727cf308fe03e5838105260c0d71e SHA512 (texlive-20170524-source.tar.xz) = 18c18940992ab94ce22e22ccd4ad798253ea14ac2ab296a10ea5e9a8da9f33989f2e2641b42b564d1d5fb53bd371da3e68726b676d706b469016ad146cd19daa Size (texlive-20170524-source.tar.xz) = 63483372 bytes +SHA1 (patch-texk_dvipsk_color.c) = a10b27bb9ae7c97d832c648cd429f5d083282b6b diff --git a/print/dvipsk/patches/patch-texk_dvipsk_color.c b/print/dvipsk/patches/patch-texk_dvipsk_color.c new file mode 100644 index 00000000000..6f151c54a12 --- /dev/null +++ b/print/dvipsk/patches/patch-texk_dvipsk_color.c @@ -0,0 +1,29 @@ +$NetBSD: patch-texk_dvipsk_color.c,v 1.1 2017/10/31 08:12:11 dbj Exp $ + +The strcpy stack checker in recent versions of clang get confused +and abort when it appears to copy past the end of the structure, +so be explicit about the variable structure field. + +Reported upstream: +http://tug.org/pipermail/tex-k/2017-August/002797.html + +--- texk/dvipsk/color.c.orig 2016-11-25 18:08:46.000000000 +0000 ++++ texk/dvipsk/color.c +@@ -37,7 +37,7 @@ static struct colorpage { + struct colorpage *next; + integer boploc; /* we use the bop loc as a page indicator */ + char *bg; +- char colordat[2]; ++ char colordat[]; + } *colorhash[COLORHASH]; + static char *cstack, *csp, *cend, *bg; + /* +@@ -216,7 +216,7 @@ bopcolor(int outtops) + } + } else { + p = (struct colorpage *)mymalloc((integer) +- (strlen(cstack) + sizeof(struct colorpage) + MAXCOLORLEN)); ++ (strlen(cstack) + sizeof(struct colorpage) + MAXCOLORLEN + 2)); + p->next = colorhash[h]; + p->boploc = pageloc; + strcpy(p->colordat, cstack); |