Merge pull request #2799 from AZero13/idk
Prevent unneeded truncation
(cherry picked from commit 1b9b42720f)
This commit is contained in:
1 parent
08cb8d2121
commit
e00289a268
1 file changed
+3
-3
@@ -490,9 +490,9 @@ aes_ctr_update(archive_crypto_ctx *ctx, const uint8_t * const in,
|
||||
size_t in_len, uint8_t * const out, size_t *out_len)
|
||||
{
|
||||
uint8_t *const ebuf = ctx->encr_buf;
|
||||
unsigned pos = ctx->encr_pos;
|
||||
unsigned max = (unsigned)((in_len < *out_len)? in_len: *out_len);
|
||||
unsigned i;
|
||||
size_t pos = ctx->encr_pos;
|
||||
size_t max = (in_len < *out_len)? in_len: *out_len;
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < max; ) {
|
||||
if (pos == AES_BLOCK_SIZE) {
|
||||
|
||||
Reference in new issue
Block a user