mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-23 11:44:53 +00:00
Fix win98 test
This commit is contained in:
1 parent
a882aab30e
commit
bdef3d6afd
3 files changed
+8
-10
No files matched your search
@@ -78,8 +78,8 @@ size_t mg_dns_parse_rr(const uint8_t *buf, size_t len, size_t ofs,
|
||||
if (len > 512) return 0; // Too large, we don't expect that
|
||||
if (s >= e) return 0; // Overflow
|
||||
|
||||
if ((rr->nlen = mg_dns_parse_name(buf, len, ofs, NULL, 0)) == 0) return 0;
|
||||
// LOG(LL_INFO, ("%zu %zu %hu %d", ofs, len, rr->nlen, is_question));
|
||||
if ((rr->nlen = (uint16_t) mg_dns_parse_name(buf, len, ofs, NULL, 0)) == 0)
|
||||
return 0;
|
||||
s += rr->nlen + 4;
|
||||
if (s > e) return 0;
|
||||
rr->atype = ((uint16_t) s[-4] << 8) | s[-3];
|
||||
@@ -113,7 +113,6 @@ bool mg_dns_parse(const uint8_t *buf, size_t len, struct mg_dns_message *dm) {
|
||||
// LOG(LL_INFO, ("A -- %zu %zu %s", ofs, n, dm->name));
|
||||
if ((n = mg_dns_parse_rr(buf, len, ofs, false, &rr)) == 0) return false;
|
||||
mg_dns_parse_name(buf, len, ofs, dm->name, sizeof(dm->name));
|
||||
LOG(LL_INFO, ("A %zu %zu %s", ofs, n, dm->name));
|
||||
ofs += n;
|
||||
|
||||
if (rr.alen == 4 && rr.atype == 1 && rr.aclass == 1) {
|
||||
|
||||
Reference in new issue
Block a user