Fixed bug #62443 (Crypt SHA256/512 Segfaults With Malformed Salt)

Fixed a memory allocation bug in crypt() SHA256/512 that can
cause segmentation faults when passed in salts with a null byte
early.
Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
  Fixed bug #62443 (Crypt SHA256/512 Segfaults With Malformed Salt)
fix NEWS order
new charsets
Merge branch 'PHP-5.3' into PHP-5.4
Fix some lengths in crypt()

Use salt_len_in instead of strlen(salt) or PHP_MAX_SALT_LEN, otherwise too
much memory will be allocated.

sha512 has a 86 character checksum, not 43. That probably was a copy&paste
from the sha256 code which indeed has 43.

The allocation also was using sizeof(char *), thus allocating 4 or 8 times
as much memory as necessary. The sizeof(char *) was removed in the 5.4
branch in b7a92c9 but forgotten on 5.3.

The memset 0 call was using PHP_MAX_SALT_LEN which can be smaller than the
output buffer and thus not zeroing out everything. Use the size of the
output buffer (needed) instead.
Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
  Fix some lengths in crypt()

Conflicts:
	ext/standard/crypt.c
Merge branch 'PHP-5.3' of ssh://git.php.net/php-src into PHP-5.3
Merge branch 'PHP-5.4' of ssh://git.php.net/php-src into PHP-5.4
Merge branch 'PHP-5.3' into PHP-5.4
fix Bug #62273 	Segmentation Fault in Mysqli/Mysqlnd
Merge branch 'PHP-5.3' into PHP-5.4
merge
- Fixed bug #62415 (Undefined variable: diff in run-tests.php on line 2093 for successful XFAIL)
Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
  - Fixed bug #62415 (Undefined variable: diff in run-tests.php on line 2093 for successful XFAIL)
Fixed the common misspelling of the word occurred (occured -> occurred)
remove duplicates, fix order
update NEWS
Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
  remove duplicates, fix order
fix bug #61359: json_encode() calls too many reallocs