From 71e3f6fde3979a2fd4c051ba878e5e3e5a8f21f5 Mon Sep 17 00:00:00 2001 From: Sascha Schumann Date: Tue, 17 Aug 1999 18:21:04 +0000 Subject: [PATCH] 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. --- ext/standard/crypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/standard/crypt.c b/ext/standard/crypt.c index 36eab9be96..1c0b301ca8 100644 --- a/ext/standard/crypt.c +++ b/ext/standard/crypt.c @@ -119,7 +119,7 @@ static void php3i_to64(char *s, long v, int n) { PHP_FUNCTION(crypt) { - char salt[PHP3_MAX_SALT_LEN]; + char salt[PHP3_MAX_SALT_LEN+1]; pval *arg1, *arg2; salt[0]='\0'; -- 2.50.1