diff options
-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; } |