From 26850548c811a98938c11e0b98a040a893589bbe Mon Sep 17 00:00:00 2001 From: alhudz Date: Mon, 1 Jun 2026 19:05:31 +0530 Subject: [PATCH] check cp bounds before reading A6 partial short in php_parserr --- ext/standard/dns.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/standard/dns.c b/ext/standard/dns.c index b3fcc1d236af..43c772075436 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -678,6 +678,7 @@ static uint8_t *php_parserr(uint8_t *cp, uint8_t *end, querybuf *answer, int typ } if (n % 16 > 8) { /* Partial short */ + CHECKCP(1); if (cp[0] != 0) { if (tp > (uint8_t *)name) { in_v6_break = 0;