Template
1
0
mirror of https://github.com/bol-van/zapret2.git synced 2026-03-21 08:45:48 +00:00
This commit is contained in:
bol-van
2026-02-11 11:02:50 +03:00
parent 827ab7cdcc
commit 8b2bff4187
4 changed files with 18 additions and 10 deletions

View File

@@ -2569,12 +2569,13 @@ bool lua_reconstruct_dissect(lua_State *L, int idx, uint8_t *buf, size_t *len, b
DLOG_ERR("ipv4 frag : invalid ip_len\n");
goto err;
}
if (frag_start>l)
size_t frag_len = iplen-l3;
if ((frag_start+frag_len)>l)
{
DLOG_ERR("ipv4 frag : fragment offset is outside of the packet\n");
DLOG_ERR("ipv4 frag : fragment end is outside of the packet\n");
goto err;
}
if (off) memmove(buf+l3,buf+l3+off,iplen-l3);
if (off) memmove(buf+l3,buf+frag_start,frag_len);
l = iplen; // shrink packet to iplen
}
else