From 0ccf1cf9ce6ac575fbcea70f279548bd2426f3d0 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Sat, 24 Feb 2007 16:36:56 +0000 Subject: [PATCH] Only do size check on create operations --- 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 645434d7874..4fcdfa89da7 100644 --- a/ext/shmop/shmop.c +++ b/ext/shmop/shmop.c @@ -169,7 +169,7 @@ PHP_FUNCTION(shmop_open) goto err; } - if (shmop->size < 1) { + if (shmop->shmflg & IPC_CREAT && shmop->size < 1) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Shared memory segment size must be greater then zero."); goto err; }