com php-src: fix handling VAR vs VAR= in putenv: ext/ standard/basic_functions.c

From: Date: Thu, 21 May 2015 06:19:54 +0000
Subject: com php-src: fix handling VAR vs VAR= in putenv: ext/ standard/basic_functions.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-86843@lists.php.net to get a copy of this message
Commit: 75286ece1a57f17c568b3d531eebc94ec5046a47 Author: Anatol Belski <ab@php.net> Thu, 21 May 2015 08:19:54 +0200 Parents: 3be4e5d71af3d7f495876fabd5a9ce46580e2d0d Branches: PHP-5.5 PHP-5.6 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=75286ece1a57f17c568b3d531eebc94ec5046a47 Log: fix handling VAR vs VAR= in putenv using _putenv_s eliminates behavior diff in TS/NTS Changed paths: M ext/standard/basic_functions.c Diff: diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 98a5bb6..f8cb91e 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -4148,7 +4148,7 @@ PHP_FUNCTION(putenv) Obviously the CRT version will be useful more often. But generally, doing both brings us on the safe track at least in NTS build. */ - && _putenv(pe.putenv_string) == 0 + && _putenv_s(pe.key, value ? value : "") == 0 # endif ) { /* success */ # endif

« previous php.cvs (#86843) next »