pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/print/dvipsk fix runtime abort when building with rece...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/779fb5afec17
branches:  trunk
changeset: 371005:779fb5afec17
user:      dbj <dbj%pkgsrc.org@localhost>
date:      Tue Oct 31 08:12:11 2017 +0000

description:
fix runtime abort when building with recent clang

diffstat:

 print/dvipsk/Makefile                          |   3 +-
 print/dvipsk/distinfo                          |   3 +-
 print/dvipsk/patches/patch-texk_dvipsk_color.c |  29 ++++++++++++++++++++++++++
 3 files changed, 33 insertions(+), 2 deletions(-)

diffs (58 lines):

diff -r 1fd2d165672a -r 779fb5afec17 print/dvipsk/Makefile
--- a/print/dvipsk/Makefile     Tue Oct 31 07:44:17 2017 +0000
+++ b/print/dvipsk/Makefile     Tue Oct 31 08:12:11 2017 +0000
@@ -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 -r 1fd2d165672a -r 779fb5afec17 print/dvipsk/distinfo
--- a/print/dvipsk/distinfo     Tue Oct 31 07:44:17 2017 +0000
+++ b/print/dvipsk/distinfo     Tue Oct 31 08:12:11 2017 +0000
@@ -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 -r 1fd2d165672a -r 779fb5afec17 print/dvipsk/patches/patch-texk_dvipsk_color.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/dvipsk/patches/patch-texk_dvipsk_color.c    Tue Oct 31 08:12:11 2017 +0000
@@ -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);



Home | Main Index | Thread Index | Old Index