Skip to content

Commit

Permalink
fix problem with garbage appearing in hostnames
Browse files Browse the repository at this point in the history
  • Loading branch information
tony2001 committed Oct 25, 2005
1 parent bc6dba1 commit e90fd61
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ext/standard/dns.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ static void _php_dns_free_res(struct __res_state res) { /* {{{ */
/* {{{ php_parserr */
static u_char *php_parserr(u_char *cp, querybuf *answer, int type_to_fetch, int store, zval **subarray)
{
u_short type, dlen;
u_short type, class, dlen;
u_long ttl;
long n, i;
u_short s;
Expand All @@ -404,6 +404,7 @@ static u_char *php_parserr(u_char *cp, querybuf *answer, int type_to_fetch, int
cp += n;

GETSHORT(type, cp);
GETSHORT(class, cp);
GETLONG(ttl, cp);
GETSHORT(dlen, cp);
if (type_to_fetch != T_ANY && type != type_to_fetch) {
Expand Down

0 comments on commit e90fd61

Please sign in to comment.