Skip to content

Commit

Permalink
Prevent out of bounds (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
M66B committed Dec 19, 2019
1 parent 2b7c929 commit 5978352
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/src/main/jni/netguard/dns.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5978352

Please sign in to comment.