summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2011-10-03 18:17:12 +0000
committerIlia Alshanetsky <iliaa@php.net>2011-10-03 18:17:12 +0000
commit567e2f1cf3f4430b465c03d5005e4b5830bee7d6 (patch)
tree4bd9f4f657122ebb3c5dee6aa17ff5361f576c36
parent2e925f6f19c3220e9f3d8dc68377e47209532196 (diff)
downloadphp-git-567e2f1cf3f4430b465c03d5005e4b5830bee7d6.tar.gz
Fixed bug #55750 (memory copy issue in sysvshm extension).
-rw-r--r--NEWS4
-rw-r--r--ext/sysvshm/sysvshm.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 456e2335b0..4caac73577 100644
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,10 @@ PHP NEWS
. Fixed bug #55825 (Missing initial value of static locals in trait methods).
(Laruence)
+- Sysvshm
+ . Fixed bug #55750 (memory copy issue in sysvshm extension).
+ (Ilia, jeffhuang9999 at gmail dot com)
+
- Zlib:
. Fixed bug #55544 (ob_gzhandler always conflicts with
zlib.output_compression). (Mike)
diff --git a/ext/sysvshm/sysvshm.c b/ext/sysvshm/sysvshm.c
index 33b1070325..781c856ec9 100644
--- a/ext/sysvshm/sysvshm.c
+++ b/ext/sysvshm/sysvshm.c
@@ -424,7 +424,7 @@ static int php_remove_shm_data(sysvshm_chunk_head *ptr, long shm_varpos)
ptr->free += chunk_ptr->next;
ptr->end -= chunk_ptr->next;
if (memcpy_len > 0) {
- memcpy(chunk_ptr, next_chunk_ptr, memcpy_len);
+ memmove(chunk_ptr, next_chunk_ptr, memcpy_len);
}
return 0;
}