com php-src: Ensure shift doesn't overflow, closes #2916: main/main.c

From: Date: Tue, 21 Nov 2017 17:48:37 +0000
Subject: com php-src: Ensure shift doesn't overflow, closes #2916: main/main.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-100322@lists.php.net to get a copy of this message
Commit: 6b54b3409a46119bc702af5d905718a88a0115a3 Author: Anatol Belski <ab@php.net> Tue, 21 Nov 2017 18:48:37 +0100 Parents: d006270040b88c6ec142bd66c2b0e50656386b03 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6b54b3409a46119bc702af5d905718a88a0115a3 Log: Ensure shift doesn't overflow, closes #2916 Bugs: https://bugs.php.net/2916 Changed paths: M main/main.c Diff: diff --git a/main/main.c b/main/main.c index 0b86eca...3e7f956 100644 --- a/main/main.c +++ b/main/main.c @@ -186,7 +186,7 @@ static PHP_INI_MH(OnChangeMemoryLimit) if (new_value) { PG(memory_limit) = zend_atol(ZSTR_VAL(new_value), ZSTR_LEN(new_value)); } else { - PG(memory_limit) = 1<<30; /* effectively, no limit */ + PG(memory_limit) = Z_L(1)<<30; /* effectively, no limit */ } return zend_set_memory_limit(PG(memory_limit)); }

« previous php.cvs (#100322) next »