mirror of
https://github.com/torvalds/linux.git
synced 2024-10-31 17:21:49 +00:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: talitos - fix bug in sg_copy_end_to_buffer
This commit is contained in:
commit
38ea6e62d3
@ -1183,10 +1183,14 @@ static size_t sg_copy_end_to_buffer(struct scatterlist *sgl, unsigned int nents,
|
||||
/* Copy part of this segment */
|
||||
ignore = skip - offset;
|
||||
len = miter.length - ignore;
|
||||
if (boffset + len > buflen)
|
||||
len = buflen - boffset;
|
||||
memcpy(buf + boffset, miter.addr + ignore, len);
|
||||
} else {
|
||||
/* Copy all of this segment */
|
||||
/* Copy all of this segment (up to buflen) */
|
||||
len = miter.length;
|
||||
if (boffset + len > buflen)
|
||||
len = buflen - boffset;
|
||||
memcpy(buf + boffset, miter.addr, len);
|
||||
}
|
||||
boffset += len;
|
||||
|
Loading…
Reference in New Issue
Block a user