Squashed commit of the following:
commit
baa221ddec90f0f3153bfb64bb62c9f5e27fbc02
Author: Devendra Dahiphale <ddahipha@cisco.com>
Date: Mon Dec 3 09:26:19 2018 -0500
appid: Fix heap overflow issue for a fuzzed pcap
return;
}
- data += ntohs(ext->length) + offsetof(ServiceSSLV3ExtensionServerName, list_length);
- length -= ntohs(ext->length) + offsetof(ServiceSSLV3ExtensionServerName, list_length);
+ unsigned len = ntohs(ext->length) + offsetof(ServiceSSLV3ExtensionServerName, list_length);
+ if (len > length)
+ return;
+
+ data += len;
+ length -= len;
}
}