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,15 +12056,18 @@ static WARN_UNUSED_RESULT int S2V(
} }
} }
if ((ret == 0) && (nonceSz > 0)) { if (ret == 0) {
ShiftAndXorRb(tmp[0], tmp[1]); if (nonceSz > 0) {
ret = wc_AesCmacGenerate(tmp[1], &macSz, nonce, nonceSz, key, keySz); ShiftAndXorRb(tmp[0], tmp[1]);
if (ret == 0) { ret = wc_AesCmacGenerate(tmp[1], &macSz, nonce, nonceSz, key,
xorbuf(tmp[0], tmp[1], AES_BLOCK_SIZE); keySz);
if (ret == 0) {
xorbuf(tmp[0], tmp[1], AES_BLOCK_SIZE);
}
}
else {
XMEMCPY(tmp[0], tmp[1], AES_BLOCK_SIZE);
} }
}
else {
XMEMCPY(tmp[0], tmp[1], AES_BLOCK_SIZE);
} }
if (ret == 0) { if (ret == 0) {