From af9d06e06add444b0c5097422cf6059fe6a15932 Mon Sep 17 00:00:00 2001 From: John Bowler Date: Wed, 13 Apr 2016 10:04:08 -0700 Subject: [PATCH] timepng: better errors, fix signed overflow Too many input files would overflow nfiles Signed-off-by: John Bowler --- contrib/libtests/timepng.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/contrib/libtests/timepng.c b/contrib/libtests/timepng.c index 52fc3fedf..6b7253d78 100644 --- a/contrib/libtests/timepng.c +++ b/contrib/libtests/timepng.c @@ -20,6 +20,7 @@ #include #include #include +#include #include @@ -279,6 +280,9 @@ static int add_one_file(FILE *fp, char *name) ok = 1; /* read ok */ } + else + fprintf(stderr, "%s: file not added\n", name); + (void)fclose(ip); /* An error in the output is fatal; exit immediately: */ @@ -463,7 +467,13 @@ int main(int argc, char **argv) for (i=1; i