From: Ilia Alshanetsky Date: Sat, 27 Nov 2004 18:17:58 +0000 (+0000) Subject: Improve offset check inside shmop_write(). X-Git-Tag: RELEASE_0_2~618 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9379801c9a18869b0eec1e59546f635ae88bc8d3;p=php Improve offset check inside shmop_write(). --- diff --git a/ext/shmop/shmop.c b/ext/shmop/shmop.c index 6fe70f30b4..ec292bd905 100644 --- a/ext/shmop/shmop.c +++ b/ext/shmop/shmop.c @@ -310,7 +310,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; }