]> granicus.if.org Git - php/commitdiff
Fixed bug #55750 (memory copy issue in sysvshm extension).
authorIlia Alshanetsky <iliaa@php.net>
Mon, 3 Oct 2011 18:17:12 +0000 (18:17 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 3 Oct 2011 18:17:12 +0000 (18:17 +0000)
NEWS
ext/sysvshm/sysvshm.c

diff --git a/NEWS b/NEWS
index 456e2335b003ace8ca11d83e3ef25a9a1254b967..4caac735775e8b40fef826fb1c7de8a055e1b881 100644 (file)
--- 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)
index 33b1070325a6e090c498827a2f534c49581cbfd4..781c856ec92e8c63e01cb51515a3aeb357169a27 100644 (file)
@@ -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;
 }