mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
crypto: scatterwalk - Add missing sg_init_table to scatterwalk_ffwd
We need to call sg_init_table as otherwise the first entry may inadvertently become the last. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
693b549d39
commit
fdaef75f66
@ -158,6 +158,7 @@ struct scatterlist *scatterwalk_ffwd(struct scatterlist dst[2],
|
||||
src = sg_next(src);
|
||||
}
|
||||
|
||||
sg_init_table(dst, 2);
|
||||
sg_set_page(dst, sg_page(src), src->length - len, src->offset + len);
|
||||
scatterwalk_crypto_chain(dst, sg_next(src), 0, 2);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user