summaryrefslogtreecommitdiff
path: root/ext/shmop/shmop.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/shmop/shmop.c')
-rw-r--r--ext/shmop/shmop.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/ext/shmop/shmop.c b/ext/shmop/shmop.c
index 5ee2ca266f..ebd5082c8d 100644
--- a/ext/shmop/shmop.c
+++ b/ext/shmop/shmop.c
@@ -244,11 +244,7 @@ PHP_FUNCTION(shmop_read)
startaddr = shmop->addr + start;
bytes = count ? count : shmop->size - start;
- return_string = emalloc(bytes+1);
- memcpy(return_string, startaddr, bytes);
- return_string[bytes] = 0;
-
- RETURN_STRINGL(return_string, bytes, 0);
+ RETURN_STRINGL(startaddr, bytes, 1);
}
/* }}} */