psmisc/psmisc-22.8-to-22.7-backport.patch

13 lines
391 B
Diff

--- src/pstree.c.orig 2008-12-16 11:13:35.000000000 +0100
+++ src/pstree.c 2009-10-08 19:37:59.000000000 +0200
@@ -749,6 +749,9 @@
exit (1);
}
(void) close (fd);
+ /* If we have read the maximum screen length of args, bring it back by one to stop overflow */
+ if (size >= buffer_size)
+ size--;
if (size)
buffer[size++] = 0;
#ifdef WITH_SELINUX