Skip to content

Commit 567e2f1

Browse files
author
Ilia Alshanetsky
committed
Fixed bug #55750 (memory copy issue in sysvshm extension).
1 parent 2e925f6 commit 567e2f1

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ PHP NEWS
1515
. Fixed bug #55825 (Missing initial value of static locals in trait methods).
1616
(Laruence)
1717

18+
- Sysvshm
19+
. Fixed bug #55750 (memory copy issue in sysvshm extension).
20+
(Ilia, jeffhuang9999 at gmail dot com)
21+
1822
- Zlib:
1923
. Fixed bug #55544 (ob_gzhandler always conflicts with
2024
zlib.output_compression). (Mike)

ext/sysvshm/sysvshm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ static int php_remove_shm_data(sysvshm_chunk_head *ptr, long shm_varpos)
424424
ptr->free += chunk_ptr->next;
425425
ptr->end -= chunk_ptr->next;
426426
if (memcpy_len > 0) {
427-
memcpy(chunk_ptr, next_chunk_ptr, memcpy_len);
427+
memmove(chunk_ptr, next_chunk_ptr, memcpy_len);
428428
}
429429
return 0;
430430
}

0 commit comments

Comments
 (0)