Skip to content

Commit

Permalink
Bump up max DNS responses 10->15
Browse files Browse the repository at this point in the history
  • Loading branch information
cpq committed Oct 8, 2023
1 parent c29ee76 commit e357cb3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mongoose.c
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ bool mg_dns_parse(const uint8_t *buf, size_t len, struct mg_dns_message *dm) {

if (len < sizeof(*h)) return 0; // Too small, headers dont fit
if (mg_ntohs(h->num_questions) > 1) return 0; // Sanity
if (mg_ntohs(h->num_answers) > 10) return 0; // Sanity
if (mg_ntohs(h->num_answers) > 15) return 0; // Sanity
dm->txnid = mg_ntohs(h->txnid);

for (i = 0; i < mg_ntohs(h->num_questions); i++) {
Expand Down
2 changes: 1 addition & 1 deletion src/dns.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ bool mg_dns_parse(const uint8_t *buf, size_t len, struct mg_dns_message *dm) {

if (len < sizeof(*h)) return 0; // Too small, headers dont fit
if (mg_ntohs(h->num_questions) > 1) return 0; // Sanity
if (mg_ntohs(h->num_answers) > 10) return 0; // Sanity
if (mg_ntohs(h->num_answers) > 15) return 0; // Sanity
dm->txnid = mg_ntohs(h->txnid);

for (i = 0; i < mg_ntohs(h->num_questions); i++) {
Expand Down

0 comments on commit e357cb3

Please sign in to comment.