pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/bison



Module Name:    pkgsrc
Committed By:   adam
Date:           Fri Aug 18 21:43:03 UTC 2017

Modified Files:
        pkgsrc/devel/bison: distinfo
Added Files:
        pkgsrc/devel/bison/patches: patch-lib_vasnprintf.c

Log Message:
Fix crash on macOS 10.13 (Darwin 7).


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 pkgsrc/devel/bison/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/bison/patches/patch-lib_vasnprintf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/bison/distinfo
diff -u pkgsrc/devel/bison/distinfo:1.46 pkgsrc/devel/bison/distinfo:1.47
--- pkgsrc/devel/bison/distinfo:1.46    Tue Nov  3 03:27:16 2015
+++ pkgsrc/devel/bison/distinfo Fri Aug 18 21:43:03 2017
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.46 2015/11/03 03:27:16 agc Exp $
+$NetBSD: distinfo,v 1.47 2017/08/18 21:43:03 adam Exp $
 
 SHA1 (bison-3.0.4.tar.xz) = 8270497aad88c7dd4f2c317298c50513fb0c3c8e
 RMD160 (bison-3.0.4.tar.xz) = 414959f3d619d8e4875e241ee02852b2ff13c2cb
@@ -7,3 +7,4 @@ Size (bison-3.0.4.tar.xz) = 1973796 byte
 SHA1 (patch-data_glr.c) = a2e0900ed995e4320e80f8ed05eae8e82be50502
 SHA1 (patch-lib_isnan.c) = 5b44fc6e2e97e36f91cd784bf3a38ad459fccdab
 SHA1 (patch-lib_stdio.in.h) = bb793f0c8f56c3a838609f8a86cf5afc70420da8
+SHA1 (patch-lib_vasnprintf.c) = 2bced6c121efc9bc5894174c7745ba89e8f53033

Added files:

Index: pkgsrc/devel/bison/patches/patch-lib_vasnprintf.c
diff -u /dev/null pkgsrc/devel/bison/patches/patch-lib_vasnprintf.c:1.1
--- /dev/null   Fri Aug 18 21:43:03 2017
+++ pkgsrc/devel/bison/patches/patch-lib_vasnprintf.c   Fri Aug 18 21:43:03 2017
@@ -0,0 +1,33 @@
+$NetBSD: patch-lib_vasnprintf.c,v 1.1 2017/08/18 21:43:03 adam Exp $
+
+Fix crash on macOS 10.13 (Darwin 17).
+http://git.savannah.gnu.org/cgit/gnulib.git/commit/lib/vasnprintf.c?id=7df04f9b8a0adb1575ca0555775ec10860143cbf
+
+--- lib/vasnprintf.c.orig      2015-01-04 16:46:03.000000000 +0000
++++ lib/vasnprintf.c
+@@ -4858,7 +4869,10 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *
+ #endif
+                   *fbp = dp->conversion;
+ #if USE_SNPRINTF
+-# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
++# if ! (((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3))        \
++         && !defined __UCLIBC__)                                            \
++        || (defined __APPLE__ && defined __MACH__)                          \
++        || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
+                 fbp[1] = '%';
+                 fbp[2] = 'n';
+                 fbp[3] = '\0';
+@@ -4872,6 +4886,13 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *
+                    in format strings in writable memory may crash the program
+                    (if compiled with _FORTIFY_SOURCE=2), so we should avoid it
+                    in this situation.  */
++                /* On Mac OS X 10.3 or newer, we know that snprintf's return
++                   value conforms to ISO C 99: the tests gl_SNPRINTF_RETVAL_C99
++                   and gl_SNPRINTF_TRUNCATION_C99 pass.
++                   Therefore we can avoid using %n in this situation.
++                   On Mac OS X 10.13 or newer, the use of %n in format strings
++                   in writable memory by default crashes the program, so we
++                   should avoid it in this situation.  */
+                 /* On native Windows systems (such as mingw), we can avoid using
+                    %n because:
+                      - Although the gl_SNPRINTF_TRUNCATION_C99 test fails,



Home | Main Index | Thread Index | Old Index