diff options
author | Stanislav Malyshev <stas@php.net> | 2013-04-23 21:42:15 -0700 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2013-04-23 21:43:35 -0700 |
commit | 18fdab5a09b64252a9a61ad6d1b2eff4a257b8f2 (patch) | |
tree | 170773479457ab446d76fc501f7a8c12680eaafd /ext/standard/dns.c | |
parent | 4cf0647399b7f79fa1d74bba9d528bc74b78ba10 (diff) | |
download | php-git-18fdab5a09b64252a9a61ad6d1b2eff4a257b8f2.tar.gz |
Fix bug #64458 (dns_get_record result with string of length -1)
Diffstat (limited to 'ext/standard/dns.c')
-rw-r--r-- | ext/standard/dns.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/dns.c b/ext/standard/dns.c index 7bf7ccac85..8e24a817ff 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -514,7 +514,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; |