From 9dcd4e70a132bf1fe57fd6d599ae646cefd358a0 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Thu, 26 Sep 2013 11:48:38 +1000 Subject: [PATCH] Minimise size of serial string we copy in BF1 stats to avoid overflow. --- driver-bitfury.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver-bitfury.c b/driver-bitfury.c index 2e0b1635..84ac35a3 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;