Fixes Coverity issues reported from DNS_Mgr merge

Reports fixed: 1488295, 1488292, 1488281, 1488279
This commit is contained in:
Tim Wojtulewicz 2022-05-03 09:49:47 -07:00
parent aa5a5b2136
commit e28d561f79
2 changed files with 14 additions and 7 deletions

View file

@ -314,7 +314,8 @@ TEST_CASE("dns_mapping save reload")
char buffer[4096];
memset(buffer, 0, 4096);
FILE* tmpfile = fmemopen(buffer, 4096, "r+");
fseek(tmpfile, 0, SEEK_END);
if ( fseek(tmpfile, 0, SEEK_END) < 0 )
reporter->Error("DNS_Mapping: seek failed");
// Try loading from the file at EOF. This should cause a mapping failure.
DNS_Mapping mapping(tmpfile);