Browse Source

Bugfix: antminer: Avoid NULL dereference for non-BM1382/4 devices

Luke Dashjr 10 years ago
parent
commit
04e9c86228
1 changed files with 1 additions and 1 deletions
  1. 1 1
      driver-antminer.c

+ 1 - 1
driver-antminer.c

@@ -49,7 +49,7 @@ static const char *bm1382_chips[] = {
 
 static bool antminer_chip_has_bm1382_freq_register(const char * const prodstr)
 {
-	for (const char **chipname = bm1382_chips; chipname; ++chipname) {
+	for (const char **chipname = bm1382_chips; *chipname; ++chipname) {
 		if (strstr(prodstr, *chipname)) {
 			return true;
 		}