Stas)
. Fixed bug #62432 (ReflectionMethod random corrupt memory on high
concurrent). (Johannes)
+ . Fixed bug #62443 (Crypt SHA256/512 Segfaults With Malformed
+ Salt). (Anthony Ferrara)
- Fileinfo:
. Fixed magic file regex support. (Felipe)
char *output;
int needed = (sizeof(sha512_salt_prefix) - 1
+ sizeof(sha512_rounds_prefix) + 9 + 1
- + strlen(salt) + 1 + 43 + 1);
+ + PHP_MAX_SALT_LEN + 1 + 43 + 1);
output = emalloc(needed * sizeof(char *));
salt[salt_in_len] = '\0';
char *output;
int needed = (sizeof(sha256_salt_prefix) - 1
+ sizeof(sha256_rounds_prefix) + 9 + 1
- + strlen(salt) + 1 + 43 + 1);
+ + PHP_MAX_SALT_LEN + 1 + 43 + 1);
output = emalloc(needed * sizeof(char *));
salt[salt_in_len] = '\0';
--- /dev/null
+--TEST--
+Bug #62443 Crypt SHA256/512 Segfaults With Malformed Salt
+--FILE--
+<?php
+crypt("foo", '$5$'.chr(0).'abc');
+crypt("foo", '$6$'.chr(0).'abc');
+echo "OK!";
+--EXPECT--
+OK!