mirror of
https://github.com/M66B/NetGuard.git
synced 2025-01-03 05:44:14 +00:00
Prevent out of bounds (4)
This commit is contained in:
parent
e98d5ef6a9
commit
81c8320dff
1 changed files with 1 additions and 1 deletions
|
@ -34,7 +34,7 @@ int32_t get_qname(const uint8_t *data, const size_t datalen, uint16_t off, char
|
|||
if (count++ > 25)
|
||||
break;
|
||||
|
||||
if (len & 0xC0) {
|
||||
if (ptr + 1 < datalen && (len & 0xC0)) {
|
||||
uint16_t jump = (uint16_t) ((len & 0x3F) * 256 + *(data + ptr + 1));
|
||||
if (jump >= datalen) {
|
||||
log_android(ANDROID_LOG_DEBUG, "DNS invalid jump");
|
||||
|
|
Loading…
Reference in a new issue