]> granicus.if.org Git - php/commitdiff
merge in change:
authorSascha Schumann <sas@php.net>
Tue, 17 Aug 1999 18:21:04 +0000 (18:21 +0000)
committerSascha Schumann <sas@php.net>
Tue, 17 Aug 1999 18:21:04 +0000 (18:21 +0000)
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

index 36eab9be962536925d784f64573b28a0bf33f844..1c0b301ca8f265a9d76cbd9bdbad77c24042078c 100644 (file)
@@ -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';