Commit 85008b84af5c34c0821b34765db17339c5e9bcc2

Con Kolivas 2013-08-31T22:53:59

Merge branch 'master' of github.com:ckolivas/cgminer

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/driver-bflsc.c b/driver-bflsc.c
index 7f773ab..570a65a 100644
--- a/driver-bflsc.c
+++ b/driver-bflsc.c
@@ -609,7 +609,8 @@ static bool getinfo(struct cgpu_info *bflsc, int dev)
 		return ok;
 
 	tmp = str_text(buf);
-	strcpy(sc_dev.getinfo, tmp);
+	strncpy(sc_dev.getinfo, tmp, sizeof(sc_dev.getinfo));
+	sc_dev.getinfo[sizeof(sc_dev.getinfo)-1] = '\0';
 	free(tmp);
 
 	for (i = 0; i < lines-2; i++) {