Skip to content

Commit 2685054

Browse files
committed
check cp bounds before reading A6 partial short in php_parserr
1 parent 69e023f commit 2685054

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

ext/standard/dns.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,7 @@ static uint8_t *php_parserr(uint8_t *cp, uint8_t *end, querybuf *answer, int typ
678678
}
679679
if (n % 16 > 8) {
680680
/* Partial short */
681+
CHECKCP(1);
681682
if (cp[0] != 0) {
682683
if (tp > (uint8_t *)name) {
683684
in_v6_break = 0;

0 commit comments

Comments
 (0)