commit 796beb54707fb36d44e498025d44fa3296fd3eff Author: Mark Johnston <markj@FreeBSD.org> Date: Wed Jun 7 14:20:25 2023 -0400 crypto: Advance the correct pointer in crypto_cursor_copydata() PR: 271766 diff --git a/sys/opencrypto/criov.c b/sys/opencrypto/criov.c index c832a9af9eec..c1bd4919ec5c 100644 --- a/sys/opencrypto/criov.c +++ b/sys/opencrypto/criov.c @@ -591,7 +591,7 @@ crypto_cursor_copydata(struct crypto_buffer_cursor *cc, int size, void *vdst) remain = MIN(PAGE_SIZE - cc->cc_offset, cc->cc_buf_len); todo = MIN(remain, size); memcpy(dst, src, todo); - src += todo; + dst += todo; cc->cc_buf_len -= todo; if (todo < remain) { cc->cc_offset += todo;