mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-06 08:40:50 +02:00
fix(qat): fenrir 586 guard exit memcpy on error path
This commit is contained in:
@@ -1100,9 +1100,12 @@ exit:
|
||||
}
|
||||
|
||||
/* Capture the inline decrypt into the output. */
|
||||
XMEMCPY(out, dataBuf, inOutSz);
|
||||
if (cipherDirection == CPA_CY_SYM_CIPHER_DIRECTION_ENCRYPT) {
|
||||
if (authTag != NULL && authTagSz > 0) {
|
||||
if (ret == 0 && dataBuf != NULL) {
|
||||
XMEMCPY(out, dataBuf, inOutSz);
|
||||
}
|
||||
if (ret == 0 &&
|
||||
cipherDirection == CPA_CY_SYM_CIPHER_DIRECTION_ENCRYPT) {
|
||||
if (authTag != NULL && authTagSz > 0 && authTagBuf != NULL) {
|
||||
XMEMCPY(authTag, authTagBuf, authTagSz);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user