git: 0d2318bbb4cc - stable/13 - crypto: Advance the correct pointer in crypto_cursor_copydata()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 19 Jun 2023 13:08:39 UTC
The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0d2318bbb4ccd89f1e698b93dc06448b1fdffb74 commit 0d2318bbb4ccd89f1e698b93dc06448b1fdffb74 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2023-06-12 16:09:54 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2023-06-19 12:57:08 +0000 crypto: Advance the correct pointer in crypto_cursor_copydata() PR: 271766 Reported by: Michael Laß <bevan@bi-co.net> MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40468 (cherry picked from commit 9f7fdd8c1ab153104275e59b49b2d567cec95256) --- sys/opencrypto/criov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/opencrypto/criov.c b/sys/opencrypto/criov.c index 2c3bc6b37cb9..ded1d8bd1df3 100644 --- a/sys/opencrypto/criov.c +++ b/sys/opencrypto/criov.c @@ -607,7 +607,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;