BugFix: Fix issue #669, Contributed by Enna1

This commit is contained in:
Nick Peng
2021-01-09 12:28:51 +08:00
parent 81ce05e6af
commit ed63c617bc

View File

@@ -940,7 +940,7 @@ static int _dns_decode_domain(struct dns_context *context, char *output, int siz
/*[len]string[len]string...[0]0 */
while (1) {
if (ptr > context->data + context->maxsize || ptr < context->data || output_len >= size - 1 || ptr_jump > 4) {
if (ptr >= context->data + context->maxsize || ptr < context->data || output_len >= size - 1 || ptr_jump > 4) {
return -1;
}