Skip to content

Commit 9494b1c

Browse files
committed
Fix #78819: Heap Overflow in msg_send
We need to use the proper type. Closes GH-7386.
1 parent 0b7dffb commit 9494b1c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ PHP NEWS
1515
- Standard:
1616
. Fixed bug #71542 (disk_total_space does not work with relative paths). (cmb)
1717

18+
- SysVMsg:
19+
. Fixed bug #78819 (Heap Overflow in msg_send). (cmb)
20+
1821
- XML:
1922
. Fixed bug #81351 (xml_parse may fail, but has no error code). (cmb, Nikita)
2023

ext/sysvmsg/sysvmsg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ PHP_FUNCTION(msg_send)
414414
sysvmsg_queue_t * mq = NULL;
415415
struct php_msgbuf * messagebuffer = NULL; /* buffer to transmit */
416416
int result;
417-
int message_len = 0;
417+
size_t message_len = 0;
418418

419419
RETVAL_FALSE;
420420

0 commit comments

Comments
 (0)