From 9379801c9a18869b0eec1e59546f635ae88bc8d3 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Sat, 27 Nov 2004 18:17:58 +0000 Subject: [PATCH] Improve offset check inside shmop_write(). --- ext/shmop/shmop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.50.1