Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
  Fix bug #64458 (dns_get_record result with string of length -1)
This commit is contained in:
Stanislav Malyshev 2013-04-23 21:43:55 -07:00
commit 5e24a6e74d
2 changed files with 2 additions and 1 deletions

1
NEWS
View File

@ -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)

View File

@ -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;