mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-08-17 21:25:50 +02:00
- Fix static analysis report about unhandled EOF on error conditions
when reading anchor key files.
This commit is contained in:
+6
-2
@@ -172,10 +172,14 @@ rr_test_file(const char* input, const char* check)
|
||||
if(txt_in[0] == 0 || txt_in[0] == '\n' || txt_in[0] == ';')
|
||||
continue;
|
||||
/* read check lines */
|
||||
if(!fgets(wire_chk, (int)bufs, chf))
|
||||
if(!fgets(wire_chk, (int)bufs, chf)) {
|
||||
printf("%s too short\n", check);
|
||||
if(!fgets(txt_chk, (int)bufs, chf))
|
||||
unit_assert(0);
|
||||
}
|
||||
if(!fgets(txt_chk, (int)bufs, chf)) {
|
||||
printf("%s too short\n", check);
|
||||
unit_assert(0);
|
||||
}
|
||||
chlineno += 2;
|
||||
if(vbmp) printf("%s:%d %s", check, chlineno-1, wire_chk);
|
||||
if(vbmp) printf("%s:%d %s", check, chlineno, txt_chk);
|
||||
|
||||
Reference in New Issue
Block a user