Browse Source

Merge commit '699a5a1' into bfgminer

Luke Dashjr 12 years ago
parent
commit
7ad276369f
1 changed files with 2 additions and 1 deletions
  1. 2 1
      fpgautils.c

+ 2 - 1
fpgautils.c

@@ -1023,7 +1023,8 @@ bool load_bitstream_intelhex(bytes_t *rv, const char *dname, const char *repr, c
 			applog(LOG_ERR, "Error reading '%s'", fn);
 			goto ihxerr;
 		}
-		fgets(buf, sizeof(buf), F);
+		if (!fgets(buf, sizeof(buf), F))
+			goto ihxerr;
 		if (unlikely(buf[0] != ':'))
 			goto ihxerr;
 		if (unlikely(!(