cvs: /php4/ext/standard crypt.c

From: Date: Tue, 17 Aug 1999 18:21:04 +0000
Subject: cvs: /php4/ext/standard crypt.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-3521@lists.php.net to get a copy of this message
sas Tue Aug 17 14:21:04 1999 EDT Modified files: /php4/ext/standard crypt.c Log: merge in change: Date: Monday June 28, 1999 @ 4:40 Author: bjh Update of /repository/php3/functions In directory php:/tmp/cvs-serv5697 Modified Files: crypt.c Log Message: Stop core dump using crypt() with standard DES. When PHP3_MAX_SALT_LEN = 2 adding the null terminator to the salt exceeds allocated space causing stack corruption. Index: php4/ext/standard/crypt.c diff -u php4/ext/standard/crypt.c:1.7 php4/ext/standard/crypt.c:1.8 --- php4/ext/standard/crypt.c:1.7 Mon Jul 26 16:09:08 1999 +++ php4/ext/standard/crypt.c Tue Aug 17 14:21:04 1999 @@ -17,7 +17,7 @@ | Rasmus Lerdorf <rasmus@lerdorf.on.ca> | +----------------------------------------------------------------------+ */ -/* $Id: crypt.c,v 1.7 1999/07/26 20:09:08 andrey Exp $ */ +/* $Id: crypt.c,v 1.8 1999/08/17 18:21:04 sas Exp $ */ #include <stdlib.h> #include "php.h" @@ -119,7 +119,7 @@ PHP_FUNCTION(crypt) { - char salt[PHP3_MAX_SALT_LEN]; + char salt[PHP3_MAX_SALT_LEN+1]; pval *arg1, *arg2; salt[0]='\0';

« previous php.version4 (#3521) next »