Browse Source

Bugfix: bitforce: Make noncebuf large enough for max qresults +1 (for OK line)

Luke Dashjr 13 years ago
parent
commit
759d9b8a86
1 changed files with 1 additions and 1 deletions
  1. 1 1
      driver-bitforce.c

+ 1 - 1
driver-bitforce.c

@@ -217,7 +217,7 @@ struct bitforce_data {
 	unsigned char *next_work_obs;    // Start of data to send
 	unsigned char *next_work_obs;    // Start of data to send
 	unsigned char next_work_obsz;
 	unsigned char next_work_obsz;
 	const char *next_work_cmd;
 	const char *next_work_cmd;
-	char noncebuf[14 + (BITFORCE_MAX_QUEUED * BITFORCE_QRESULT_LINE_LEN)];
+	char noncebuf[14 + ((BITFORCE_MAX_QRESULTS+1) * BITFORCE_QRESULT_LINE_LEN)];
 	int poll_func;
 	int poll_func;
 	enum bitforce_proto proto;
 	enum bitforce_proto proto;
 	bool sc;
 	bool sc;