1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
Author: Unknown
Description: fix good old stack smash
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=457828
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/chkutmp.c
+++ b/chkutmp.c
@@ -99,7 +99,7 @@
while (isspace(*s)) /* skip spaces */
s++;
d = pid;
- for (x = 0; (!isspace(*s)) && (*d++ = *s++) && x <= UT_LINESIZE; x++) /* grab pid */
+ for (x = 0; (!isspace(*s)) && (*d++ = *s++) && x <= UT_PIDSIZE; x++) /* grab pid */
;
*d = '\0';
curp->ps_pid = atoi(pid);
|