fix clang-analyzer-core.NonNullParamChecker.

This commit is contained in:
Daniel Pouzzner
2022-04-07 08:01:00 -05:00
parent 4efd06fdc1
commit 28cefb0d1a

View File

@ -12056,9 +12056,11 @@ static WARN_UNUSED_RESULT int S2V(
}
}
if ((ret == 0) && (nonceSz > 0)) {
if (ret == 0) {
if (nonceSz > 0) {
ShiftAndXorRb(tmp[0], tmp[1]);
ret = wc_AesCmacGenerate(tmp[1], &macSz, nonce, nonceSz, key, keySz);
ret = wc_AesCmacGenerate(tmp[1], &macSz, nonce, nonceSz, key,
keySz);
if (ret == 0) {
xorbuf(tmp[0], tmp[1], AES_BLOCK_SIZE);
}
@ -12066,6 +12068,7 @@ static WARN_UNUSED_RESULT int S2V(
else {
XMEMCPY(tmp[0], tmp[1], AES_BLOCK_SIZE);
}
}
if (ret == 0) {
if (dataSz >= AES_BLOCK_SIZE) {