From: Ilia Alshanetsky Date: Sat, 27 Nov 2004 18:18:19 +0000 (+0000) Subject: MFH: Improve offset check inside shmop_write(). X-Git-Tag: php-4.3.10RC2~36 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6fcaae369a251a20058c03e3cb62d1143abfcf84;p=php MFH: Improve offset check inside shmop_write(). --- diff --git a/ext/shmop/shmop.c b/ext/shmop/shmop.c index 47e3e226e5..2bc32e8138 100644 --- a/ext/shmop/shmop.c +++ b/ext/shmop/shmop.c @@ -316,7 +316,7 @@ PHP_FUNCTION(shmop_write) RETURN_FALSE; } - if (offset > shmop->size) { + if (offset < 0 || offset > shmop->size) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "offset out of range"); RETURN_FALSE; }