Skip to content

Commit 4c2db35

Browse files
committed
Merge branch 'PHP-8.1' into PHP-8.2
2 parents db7358c + 0f21cbc commit 4c2db35

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

NEWS

+3
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ PHP NEWS
6767
. Fixed bug #60994 (Reading a multibyte CLOB caps at 8192 chars).
6868
(Michael Voříšek)
6969

70+
- PHPDBG:
71+
. Fixed bug GH-10715 (heap buffer overflow on --run option misuse). (nielsdos)
72+
7073
- PGSQL:
7174
. Fix GH-10672 (pg_lo_open segfaults in the strict_types mode). (girgias)
7275

sapi/phpdbg/phpdbg_out.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,11 @@ PHPDBG_API int phpdbg_vprint(int type, int fd, const char *strfmt, va_list args)
143143
return msglen;
144144
}
145145

146-
len = phpdbg_process_print(fd, type, msg, msglen);
146+
if (UNEXPECTED(msglen == 0)) {
147+
len = 0;
148+
} else {
149+
len = phpdbg_process_print(fd, type, msg, msglen);
150+
}
147151

148152
if (msg) {
149153
free(msg);

sapi/phpdbg/tests/gh10715.phpt

192 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)