From 5052175ab8c3ce994df281cee4aa1f8c3df1b70c Mon Sep 17 00:00:00 2001 From: oetiker Date: Sun, 7 Jun 2009 14:45:55 +0000 Subject: [PATCH] consider fgets return value git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1853 a5681a0c-68f1-0310-ab6d-d61299d08faa --- src/rrd_cgi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rrd_cgi.c b/src/rrd_cgi.c index 13b7d06..27b4884 100644 --- a/src/rrd_cgi.c +++ b/src/rrd_cgi.c @@ -1387,7 +1387,8 @@ s_var **rrdcgiReadVariables( length = atoi(ip); if ((line = (char *) malloc(length + 2)) == NULL) return NULL; - fgets(line, length + 1, stdin); + if (fgets(line, length + 1, stdin) == NULL) + return NULL; } else return NULL; } else if (cp && !strcmp(cp, "GET")) { -- 2.11.0