Skip to content

Commit d472e15

Browse files
committed
Fixes for buffers when testing with Intel QAT hardware and fsanitize=address:
* Fix for DH trim of leading zeros to use memmove.
1 parent 30edb92 commit d472e15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wolfcrypt/src/port/intel/quickassist.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4246,7 +4246,7 @@ static void IntelQaDhAgreeCallback(void *pCallbackTag, CpaStatus status,
42464246

42474247
/* return data and trim leading zeros */
42484248
if (dev->qat.out && (dev->qat.out != pOut->pData || idxTrim > 0)) {
4249-
XMEMCPY(dev->qat.out, &out[idxTrim], pOut->dataLenInBytes);
4249+
XMEMMOVE(dev->qat.out, &out[idxTrim], pOut->dataLenInBytes);
42504250
}
42514251

42524252
/* return final length */

0 commit comments

Comments
 (0)