diff options
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | ext/standard/dns.c | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -4,6 +4,7 @@ PHP NEWS - Core: . Fixed bug #64578 (debug_backtrace in set_error_handler corrupts zend heap: segfault). (Laruence) + . Fixed bug #64458 (dns_get_record result with string of length -1). (Stas) . Fixed bug #64433 (follow_location parameter of context is ignored for most response codes). (Sergey Akbarov) . Fixed bugs #47675 and #64577 (fd leak on Solaris) diff --git a/ext/standard/dns.c b/ext/standard/dns.c index 074c16ee9f..3584fc1bfe 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -524,7 +524,7 @@ static u_char *php_parserr(u_char *cp, querybuf *answer, int type_to_fetch, int tp[dlen] = '\0'; cp += dlen; - add_assoc_stringl(*subarray, "txt", tp, dlen - 1, 0); + add_assoc_stringl(*subarray, "txt", tp, (dlen>0)?dlen - 1:0, 0); add_assoc_zval(*subarray, "entries", entries); } break; |