1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-02-05 03:24:26 +00:00

Merge pull request #302 from luke-jr/bugfix_ftdi_alloca

Bugfix: bitforce: Allocate enough space for FTDI description pointers
This commit is contained in:
Con Kolivas 2012-08-20 19:49:36 -07:00
commit 3b234da43f

View File

@ -175,7 +175,7 @@ static int bitforce_autodetect_ftdi(void)
applog(LOG_DEBUG, "FTDI reports %u devices", (unsigned)numDevs);
buf = alloca(65 * numDevs);
bufptrs = alloca(numDevs + 1);
bufptrs = alloca(sizeof(*bufptrs) * (numDevs + 1));
for (i = 0; i < numDevs; ++i)
bufptrs[i] = &buf[i * 65];