Bug #75810 [NEW]: getenv with valid varname crashes ntdll.dll
| From: | laurinkeithdavis at gmail dot com | Date: | Fri, 12 Jan 2018 19:12:47 +0000 |
| Subject: | Bug #75810 [NEW]: getenv with valid varname crashes ntdll.dll | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-213505@lists.php.net to get a copy of this message | ||
From: laurinkeithdavis at gmail dot com
Operating system: Windows 10 x64 Pro
PHP version: 7.1.13
Package: PHP options/info functions
Bug Type: Bug
Bug description:getenv with valid varname crashes ntdll.dll
Description:
------------
Any specific varname, if that environment variable name actually exists,
crashes PHP. If you put a non-valid environment variable name, that does
not crash and no value (getenv()), dumps the whole array, and does not
crash.
Test script:
---------------
<?php
echo getenv("PATH");
Expected result:
----------------
Value of the indicated environment variable.
Actual result:
--------------
Internal Server Error 500
AND
Log Name: Application
Source: Application Error
Date: 1/12/2018 12:46:03 PM
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Computer: KDAVIS.pridedallas.com
Description:
Faulting application name: php-cgi.exe, version: 7.1.13.0, time stamp:
0x5a4d3a49
Faulting module name: ntdll.dll, version: 10.0.16299.192, time stamp:
0x16e7ff7f
Exception code: 0xc0000374
Fault offset: 0x000da8b9
Faulting process id: 0x1ecc
Faulting application start time: 0x01d38bd593ca174a
Faulting application path: C:\PHP\php-cgi.exe
Faulting module path: C:\WINDOWS\SYSTEM32\ntdll.dll
Report Id: c4b5c9e2-dcb6-4f21-9b32-457689bce66a
Faulting package full name:
Faulting package-relative application ID:
--
Edit bug report at https://bugs.php.net/bug.php?id=75810&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75810&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75810&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75810&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=75810&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=75810&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=75810&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=75810&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=75810&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=75810&r=support
Expected behavior: https://bugs.php.net/fix.php?id=75810&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=75810&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=75810&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=75810&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75810&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=75810&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=75810&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=75810&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=75810&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=75810&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=75810&r=mysqlcfg