Gentoo Archives: gentoo-commits

From: "Kacper Kowalik (xarthisius)" <xarthisius@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-fs/mtpfs/files: mtpfs-0.9-overflow.patch
Date: Thu, 30 Jun 2011 10:16:31
Message-Id: 20110630101621.842C120054@flycatcher.gentoo.org
1 xarthisius 11/06/30 10:16:21
2
3 Added: mtpfs-0.9-overflow.patch
4 Log:
5 Initial import wrt bug 189304, thanks to everyone involved
6
7 (Portage version: 2.2.0_alpha41/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 sys-fs/mtpfs/files/mtpfs-0.9-overflow.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/mtpfs/files/mtpfs-0.9-overflow.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/mtpfs/files/mtpfs-0.9-overflow.patch?rev=1.1&content-type=text/plain
14
15 Index: mtpfs-0.9-overflow.patch
16 ===================================================================
17 Prevent possible overflow of destination buffer, as
18 strncat appends the first num characters of source
19 to destination, _plus_ a terminating null-character.
20
21 Patch written by Kacper Kowalik <xarthisius@g.o>
22 --- a/id3read.c
23 +++ b/id3read.c
24 @@ -269,7 +269,7 @@
25 if (strlen (trackstr) == 1) {
26 strcat (trackno, "0");
27 }
28 - strncat (trackno, trackstr, sizeof (trackno));
29 + strncat (trackno, trackstr, sizeof (trackno)-1);
30 g_free (trackstr);
31 g_free (posstr);
32 } else {