From owner-cvs-all Sat May 4 21:42:54 2002 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id E046937B400; Sat, 4 May 2002 21:42:50 -0700 (PDT) Received: (from jmallett@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g454goX57113; Sat, 4 May 2002 21:42:50 -0700 (PDT) (envelope-from jmallett) Message-Id: <200205050442.g454goX57113@freefall.freebsd.org> From: "J. Mallett" Date: Sat, 4 May 2002 21:42:50 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/bin/ps fmt.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 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