1 |
maksbotan 12/06/18 16:40:50 |
2 |
|
3 |
Added: overflow-fixes.patch |
4 |
Log: |
5 |
Add app-misc/empty, ebuild by James Le Cuirot <chewi@××××××××××××××.uk>. Bug #97387 |
6 |
|
7 |
(Portage version: 2.1.10.65/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 app-misc/empty/files/overflow-fixes.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/empty/files/overflow-fixes.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/empty/files/overflow-fixes.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: overflow-fixes.patch |
16 |
=================================================================== |
17 |
--- empty.c.orig 2009-07-27 18:26:42.000000000 +0100 |
18 |
+++ empty.c 2011-12-22 17:17:11.037090159 +0000 |
19 |
@@ -584,7 +584,7 @@ |
20 |
|
21 |
for (i = 1; i < argc; i++) { |
22 |
strncat(buf, " ", 1); |
23 |
- strncat(buf, argv[i], sizeof(buf)); |
24 |
+ strncat(buf, argv[i], sizeof(buf) -1); |
25 |
} |
26 |
|
27 |
(void)syslog(LOG_NOTICE, "forked %s", buf); |
28 |
@@ -686,7 +686,7 @@ |
29 |
while ((dent = readdir(dir)) != NULL) { |
30 |
if (!strncmp(fmask, dent->d_name, len)) { |
31 |
strncpy(fname, dent->d_name, sizeof(fname) - 1); |
32 |
- fname[sizeof(buf) - 1] = '\0'; |
33 |
+ fname[MAXPATHLEN - 1] = '\0'; |
34 |
|
35 |
strtok(fname, sep); /* empty */ |
36 |
strtok(NULL, sep); /* PPID */ |