From owner-cvs-all Thu Aug 16 23:25:47 2001 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 B8DD237B403; Thu, 16 Aug 2001 23:25:38 -0700 (PDT) (envelope-from mike@FreeBSD.org) Received: (from mike@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f7H6PcL68326; Thu, 16 Aug 2001 23:25:38 -0700 (PDT) (envelope-from mike) Message-Id: <200108170625.f7H6PcL68326@freefall.freebsd.org> From: Mike Barcroft Date: Thu, 16 Aug 2001 23:25:38 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/usr.bin/login login.c X-FreeBSD-CVS-Branch: RELENG_4 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 mike 2001/08/16 23:25:38 PDT Modified files: (Branch: RELENG_4) usr.bin/login login.c Log: MFC Rev 1.66: o Replace occurrences of strncpy(3) with strlcpy(3); most of the uses of it were wrong anyway. o Always check for NULL returns on strdup(3). o Fix a possible buffer overflow in strcpy(3). o Fix a format string vulnerability. o t->ty_type in stypeof() could be NULL and eventually cause a segmentation fault in setenv(3), so check for that. MFC Rev 1.67: Fix some bogus strncpy(3) to strlcpy(3) changes I made in the previous revision. structures don't leave room for a NUL character. Also fix "UNKNOWN" which should have just been UNKNOWN. Approved by: murray Revision Changes Path 1.51.2.12 +43 -19 src/usr.bin/login/login.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message