diff options
Diffstat (limited to 'crypto/ansi_cprng.c')
-rw-r--r-- | crypto/ansi_cprng.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/ansi_cprng.c b/crypto/ansi_cprng.c index c0bb3778f1ae..666f1962a160 100644 --- a/crypto/ansi_cprng.c +++ b/crypto/ansi_cprng.c | |||
@@ -230,11 +230,11 @@ remainder: | |||
230 | */ | 230 | */ |
231 | if (byte_count < DEFAULT_BLK_SZ) { | 231 | if (byte_count < DEFAULT_BLK_SZ) { |
232 | empty_rbuf: | 232 | empty_rbuf: |
233 | for (; ctx->rand_data_valid < DEFAULT_BLK_SZ; | 233 | while (ctx->rand_data_valid < DEFAULT_BLK_SZ) { |
234 | ctx->rand_data_valid++) { | ||
235 | *ptr = ctx->rand_data[ctx->rand_data_valid]; | 234 | *ptr = ctx->rand_data[ctx->rand_data_valid]; |
236 | ptr++; | 235 | ptr++; |
237 | byte_count--; | 236 | byte_count--; |
237 | ctx->rand_data_valid++; | ||
238 | if (byte_count == 0) | 238 | if (byte_count == 0) |
239 | goto done; | 239 | goto done; |
240 | } | 240 | } |