Prevent garbage on DNS_TXT records

Bug #64458 fixed an off by one error when decoding TXT records
that resulted with garbage at the end of the string returned.

Reviewed By: @scannell

Differential Revision: D1146140
Esse commit está contido em:
Paul Saab
2014-01-28 09:10:06 -08:00
commit de Sara Golemon
commit fc26e82dc2
+1 -1
Ver Arquivo
@@ -500,7 +500,7 @@ static unsigned char *php_parserr(unsigned char *cp, querybuf *answer,
memcpy(tp + ll , cp + ll + 1, n);
ll = ll + n + 1;
}
s.setSize(dlen);
s.setSize(dlen > 0 ? dlen - 1 : 0);
cp += dlen;
subarray.set(s_txt, s);