static inline void apply_acpkm_magma(struct ossl_gost_cipher_ctx *
ctx, unsigned int *num)
{
- if (!ctx->key_meshing || (*num < ctx->key_meshing))
+ if (!ctx->key_meshing || (*num < (unsigned int)ctx->key_meshing))
return;
acpkm_magma_key_meshing(&ctx->cctx);
*num &= MAGMA_BLOCK_MASK;
}
}
- for (; i + 8 < inl; i += 8, in_ptr += 8, out_ptr += 8) {
+ for (; (inl - i) >= 8; i += 8, in_ptr += 8, out_ptr += 8) {
/*
* block cipher current iv
*/
}
}
- for (; i + 8 < inl; i += 8, in_ptr += 8, out_ptr += 8) {
+ for (; (inl - i) >= 8; i += 8, in_ptr += 8, out_ptr += 8) {
/*
* block cipher current iv
*/