File: 18_fix-stack-smash.patch

package info (click to toggle)
chkrootkit 0.57-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 5,536 kB
  • sloc: sh: 119,742; ansic: 10,422; makefile: 130
file content (31 lines) | stat: -rw-r--r-- 1,017 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From: Unknown Author <team+pkg-security@tracker.debian.org>
Date: Sun, 9 Jul 2017 18:42:55 +0200
Subject: chkutmp: Change UT_LINESIZE to UT_PIDSIZE

 Dates from 2017 or earlier
 The previous description stated only 'fix good old stack smash'
 .
 Upstreamable
 
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=457828
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=457828

Last-Updated: 2021-10-10
Forwarded: https://lists.debian.org/debian-security-tools/2021/10/msg00006.html
---
 chkutmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/chkutmp.c b/chkutmp.c
index 8c7df88..1ab942a 100644
--- a/chkutmp.c
+++ b/chkutmp.c
@@ -99,7 +99,7 @@ int fetchps(struct ps_line *psl_p)
 		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);