mirror of
https://github.com/M66B/NetGuard.git
synced 2025-02-21 22:07:15 +00:00
Prevent out of bounds (2)
This commit is contained in:
parent
2b7c929a5a
commit
5978352b2d
1 changed files with 3 additions and 0 deletions
|
@ -22,6 +22,9 @@
|
|||
int32_t get_qname(const uint8_t *data, const size_t datalen, uint16_t off, char *qname) {
|
||||
*qname = 0;
|
||||
|
||||
if (off >= datalen)
|
||||
return -1;
|
||||
|
||||
uint16_t c = 0;
|
||||
uint8_t noff = 0;
|
||||
uint16_t ptr = off;
|
||||
|
|
Loading…
Reference in a new issue