summaryrefslogtreecommitdiff
path: root/ext/shmop
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2004-11-27 18:17:58 +0000
committerIlia Alshanetsky <iliaa@php.net>2004-11-27 18:17:58 +0000
commit9379801c9a18869b0eec1e59546f635ae88bc8d3 (patch)
treeb02deb10505f94e6bbda1be504294a9da281f408 /ext/shmop
parentc51e49147ebec23f47537fb2481ecadfcbf5117a (diff)
downloadphp-git-9379801c9a18869b0eec1e59546f635ae88bc8d3.tar.gz
Improve offset check inside shmop_write().
Diffstat (limited to 'ext/shmop')
-rw-r--r--ext/shmop/shmop.c2
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;
}