mbed TLS upgraded to 2.6.0
Fork of mbedtls by
Diff: library/cipher.c
- Revision:
- 1:9ebc941037d5
- Parent:
- 0:cdf462088d13
--- a/library/cipher.c Thu Jan 05 00:18:44 2017 +0000 +++ b/library/cipher.c Fri Sep 29 18:41:59 2017 +0100 @@ -326,9 +326,9 @@ * If there is not enough data for a full block, cache it. */ if( ( ctx->operation == MBEDTLS_DECRYPT && - ilen + ctx->unprocessed_len <= block_size ) || + ilen <= block_size - ctx->unprocessed_len ) || ( ctx->operation == MBEDTLS_ENCRYPT && - ilen + ctx->unprocessed_len < block_size ) ) + ilen < block_size - ctx->unprocessed_len ) ) { memcpy( &( ctx->unprocessed_data[ctx->unprocessed_len] ), input, ilen );