diff --git a/smallapp/unbound-anchor.c b/smallapp/unbound-anchor.c index 25e2d72c9..26173fa49 100644 --- a/smallapp/unbound-anchor.c +++ b/smallapp/unbound-anchor.c @@ -389,7 +389,8 @@ read_cert_file(char* file) exit(0); } /* read away newline after --END CERT-- */ - (void)fgets(buf, (int)sizeof(buf), in); + if(!fgets(buf, (int)sizeof(buf), in)) + break; content = 1; } fclose(in);