|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-03-03 20:31 UTC] pierre dot php at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 05:00:01 2025 UTC |
Description: ------------ If an ini value is quoted with ' or " - they are not removed. Reproduce code: --------------- Simply: php_value memory_limit "32M" which makes PHP crazy (mem limit is 0, any mallocs fail etc) The patch: --- a/htscanner.c +++ b/htscanner.c @@ -133,6 +133,17 @@ static void value_hnd(char *string, int flag, int status, HashTable *ini_entries } } + if (len > 1) { + if (*value == '"' || *value == '\'') { + if (*value == value[len - 1]) { + value[len - 1] = 0; + len--; + } + value++; + len--; + } + } + #define _CHECK_PATH(var, var_len, ini) php_htscanner_ini_check_path(var, var_len, ini, sizeof(ini)) /* safe_mode & basedir check */ Expected result: ---------------- just: 32M Actual result: -------------- actually: "32M"