Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-devel/m4/files: m4-1.4.10-seek.patch m4-1.4.10-gnulib-vasnprintf.patch
Date: Sat, 29 Mar 2008 17:44:29
Message-Id: E1Jff6Q-0005v8-Qo@stork.gentoo.org
1 vapier 08/03/29 17:44:26
2
3 Modified: m4-1.4.10-seek.patch
4 Added: m4-1.4.10-gnulib-vasnprintf.patch
5 Log:
6 Grab fix from upstream gnulib for %n crash #213833 by Sergey Dryabzhinsky.
7 (Portage version: 2.2_pre5)
8
9 Revision Changes Path
10 1.2 sys-devel/m4/files/m4-1.4.10-seek.patch
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/m4/files/m4-1.4.10-seek.patch?rev=1.2&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/m4/files/m4-1.4.10-seek.patch?rev=1.2&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/m4/files/m4-1.4.10-seek.patch?r1=1.1&r2=1.2
15
16 Index: m4-1.4.10-seek.patch
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sys-devel/m4/files/m4-1.4.10-seek.patch,v
19 retrieving revision 1.1
20 retrieving revision 1.2
21 diff -u -r1.1 -r1.2
22 --- m4-1.4.10-seek.patch 15 Oct 2007 09:03:09 -0000 1.1
23 +++ m4-1.4.10-seek.patch 29 Mar 2008 17:44:26 -0000 1.2
24 @@ -1,3 +1,5 @@
25 +Fix for BSD systems pulled from upstream.
26 +
27 diff -ur a/src/output.c b/src/output.c
28 --- a/src/output.c 2007-07-05 04:56:06 +0100
29 +++ b/src/output.c 2007-10-15 09:56:23 +0100
30
31
32
33 1.1 sys-devel/m4/files/m4-1.4.10-gnulib-vasnprintf.patch
34
35 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/m4/files/m4-1.4.10-gnulib-vasnprintf.patch?rev=1.1&view=markup
36 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/m4/files/m4-1.4.10-gnulib-vasnprintf.patch?rev=1.1&content-type=text/plain
37
38 Index: m4-1.4.10-gnulib-vasnprintf.patch
39 ===================================================================
40 http://bugs.gentoo.org/213833
41
42 commit 913c09becd9df89dbd9b9f386e7f35c240d5efe8
43 Author: Bruno Haible <bruno@×××××.org>
44 Date: Fri Oct 19 01:50:42 2007 +0200
45
46 Don't use %n on glibc >= 2.3 systems.
47
48 diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c
49 index f563823..5d818aa 100644
50 --- a/lib/vasnprintf.c
51 +++ b/lib/vasnprintf.c
52 @@ -3385,9 +3385,21 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
53 #endif
54 *fbp = dp->conversion;
55 #if USE_SNPRINTF
56 +# if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3))
57 fbp[1] = '%';
58 fbp[2] = 'n';
59 fbp[3] = '\0';
60 +# else
61 + /* On glibc2 systems from glibc >= 2.3 - probably also older
62 + ones - we know that snprintf's returns value conforms to
63 + ISO C 99: the gl_SNPRINTF_DIRECTIVE_N test passes.
64 + Therefore we can avoid using %n in this situation.
65 + On glibc2 systems from 2004-10-18 or newer, the use of %n
66 + in format strings in writable memory may crash the program
67 + (if compiled with _FORTIFY_SOURCE=2), so we should avoid it
68 + in this situation. */
69 + fbp[1] = '\0';
70 +# endif
71 #else
72 fbp[1] = '\0';
73 #endif
74
75
76
77 --
78 gentoo-commits@l.g.o mailing list