From a18456a2032e49385447a1d0d2f146f65fe9a5e1 Mon Sep 17 00:00:00 2001 From: "Reynaldo H. Verdejo Pinochet" Date: Fri, 26 Dec 2014 19:01:31 -0300 Subject: [PATCH] ffserver: check for EOF|error at loop condition Signed-off-by: Reynaldo H. Verdejo Pinochet --- ffserver.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ffserver.c b/ffserver.c index 044bf6f4de..9472c41aab 100644 --- a/ffserver.c +++ b/ffserver.c @@ -1199,9 +1199,7 @@ static FFServerIPAddressACL* parse_dynamic_acl(FFServerStream *stream, HTTPConte acl = av_mallocz(sizeof(FFServerIPAddressACL)); /* Build ACL */ - for(;;) { - if (fgets(line, sizeof(line), f) == NULL) - break; + while (fgets(line, sizeof(line), f)) { line_num++; p = line; while (av_isspace(*p))