Date: Sat, 4 May 2002 21:42:50 -0700 (PDT) From: "J. Mallett" <jmallett@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/bin/ps fmt.c Message-ID: <200205050442.g454goX57113@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
jmallett 2002/05/04 21:42:50 PDT
Modified files:
bin/ps fmt.c
Log:
Check for possible overflow from sysconf _SC_ARG_MAX and error out in a
correct manner. Revert my incorrect change to use err(3) for malloc(3)
failing. Use a size_t variable to store the size of the argument buffer
we allocate, and remove silly casts as the result of having this around.
Modify the math in some of the paranoid checks for buffer overflow to
account for the fact we now are dealing with the actual size of the
buffer. Remove the static qualifier for arg_max, and the bogus setting
of it to -1.
Include <limits.h> for the definitions we use to check for possible
overflows.
Submitted by: bde
Revision Changes Path
1.19 +10 -5 src/bin/ps/fmt.c
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200205050442.g454goX57113>
