From:
Operating system: Windows Server 2008 R2 x64
PHP version: 5.3.9
Package: Unknown/Other Function
Bug Type: Bug
Bug description:null pointer dereference in php_win32_free_rng_lock()
Description:
------------
If php_win32_get_random_bytes() has never been called, then this line of
code:
+ CryptReleaseContext(hCryptProv, 0);
passes a null pointer, resulting in a C0000005 exception in
CryptReleaseContext(). This line should be preceded by:
if (has_crypto_ctx)
This was specifically tested with the windows.php.net 32-bit TS build
running on
64-bit Windows. I do not know how it behaves in other configurations.
Test script:
---------------
I do not have a short test case, but the bug is pretty obvious.
--
Edit bug report at https://bugs.php.net/bug.php?id=60895&edit=1
--
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=60895&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=60895&r=trysnapshot53
Try a snapshot (trunk):
https://bugs.php.net/fix.php?id=60895&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=60895&r=fixed
Fixed in SVN and need be documented:
https://bugs.php.net/fix.php?id=60895&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=60895&r=alreadyfixed
Need backtrace:
https://bugs.php.net/fix.php?id=60895&r=needtrace
Need Reproduce Script:
https://bugs.php.net/fix.php?id=60895&r=needscript
Try newer version:
https://bugs.php.net/fix.php?id=60895&r=oldversion
Not developer issue:
https://bugs.php.net/fix.php?id=60895&r=support
Expected behavior:
https://bugs.php.net/fix.php?id=60895&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=60895&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=60895&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=60895&r=globals
PHP 4 support discontinued:
https://bugs.php.net/fix.php?id=60895&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=60895&r=dst
IIS Stability:
https://bugs.php.net/fix.php?id=60895&r=isapi
Install GNU Sed:
https://bugs.php.net/fix.php?id=60895&r=gnused
Floating point limitations:
https://bugs.php.net/fix.php?id=60895&r=float
No Zend Extensions:
https://bugs.php.net/fix.php?id=60895&r=nozend
MySQL Configuration Error:
https://bugs.php.net/fix.php?id=60895&r=mysqlcfg