Fix fake rng to fill the buffer correctly.

This commit is contained in:
Ken MacKay
2015-06-27 16:06:58 -07:00
parent 5b571b7422
commit 8674d479d3
3 changed files with 3 additions and 0 deletions
+1
View File
@@ -19,6 +19,7 @@ int fake_rng(uint8_t *dest, unsigned size) {
unsigned amount = (size > 8 ? 8 : size);
memcpy(dest, &g_rand, amount);
dest += amount;
size -= amount;
}
return 1;
+1
View File
@@ -19,6 +19,7 @@ int fake_rng(uint8_t *dest, unsigned size) {
unsigned amount = (size > 8 ? 8 : size);
memcpy(dest, &g_rand, amount);
dest += amount;
size -= amount;
}
return 1;
+1
View File
@@ -19,6 +19,7 @@ int fake_rng(uint8_t *dest, unsigned size) {
unsigned amount = (size > 8 ? 8 : size);
memcpy(dest, &g_rand, amount);
dest += amount;
size -= amount;
}
return 1;