mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
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
This commit is contained in:
parent
718d4a1d56
commit
9f7fdd8c1a
|
@ -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);
|
remain = MIN(PAGE_SIZE - cc->cc_offset, cc->cc_buf_len);
|
||||||
todo = MIN(remain, size);
|
todo = MIN(remain, size);
|
||||||
memcpy(dst, src, todo);
|
memcpy(dst, src, todo);
|
||||||
src += todo;
|
dst += todo;
|
||||||
cc->cc_buf_len -= todo;
|
cc->cc_buf_len -= todo;
|
||||||
if (todo < remain) {
|
if (todo < remain) {
|
||||||
cc->cc_offset += todo;
|
cc->cc_offset += todo;
|
||||||
|
|
Loading…
Reference in a new issue