diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2004-11-27 18:17:58 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2004-11-27 18:17:58 +0000 |
commit | 9379801c9a18869b0eec1e59546f635ae88bc8d3 (patch) | |
tree | b02deb10505f94e6bbda1be504294a9da281f408 | |
parent | c51e49147ebec23f47537fb2481ecadfcbf5117a (diff) | |
download | php-git-9379801c9a18869b0eec1e59546f635ae88bc8d3.tar.gz |
Improve offset check inside shmop_write().
-rw-r--r-- | ext/shmop/shmop.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |