Commit 9dcd4e70a132bf1fe57fd6d599ae646cefd358a0

Con Kolivas 2013-09-26T11:48:38

Minimise size of serial string we copy in BF1 stats to avoid overflow.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/driver-bitfury.c b/driver-bitfury.c
index 2e0b163..84ac35a 100644
--- a/driver-bitfury.c
+++ b/driver-bitfury.c
@@ -266,7 +266,7 @@ static struct api_data *bitfury_api_stats(struct cgpu_info *cgpu)
 	version = info->version;
 	root = api_add_int(root, "Version", &version, true);
 	root = api_add_string(root, "Product", info->product, false);
-	sprintf(serial, "%0x", info->serial);
+	sprintf(serial, "%08x", info->serial);
 	root = api_add_string(root, "Serial", serial, true);
 
 	return root;