Skip to content

Commit 5e24a6e

Browse files
committed
Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3: Fix bug #64458 (dns_get_record result with string of length -1)
2 parents 43ab915 + 18fdab5 commit 5e24a6e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ PHP NEWS
44
- Core:
55
. Fixed bug #64578 (debug_backtrace in set_error_handler corrupts zend heap:
66
segfault). (Laruence)
7+
. Fixed bug #64458 (dns_get_record result with string of length -1). (Stas)
78
. Fixed bug #64433 (follow_location parameter of context is ignored for most
89
response codes). (Sergey Akbarov)
910
. Fixed bugs #47675 and #64577 (fd leak on Solaris)

ext/standard/dns.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ static u_char *php_parserr(u_char *cp, querybuf *answer, int type_to_fetch, int
524524
tp[dlen] = '\0';
525525
cp += dlen;
526526

527-
add_assoc_stringl(*subarray, "txt", tp, dlen - 1, 0);
527+
add_assoc_stringl(*subarray, "txt", tp, (dlen>0)?dlen - 1:0, 0);
528528
add_assoc_zval(*subarray, "entries", entries);
529529
}
530530
break;

0 commit comments

Comments
 (0)