Commit fdaef75f authored by Herbert Xu's avatar Herbert Xu

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: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 693b549d
...@@ -158,6 +158,7 @@ struct scatterlist *scatterwalk_ffwd(struct scatterlist dst[2], ...@@ -158,6 +158,7 @@ struct scatterlist *scatterwalk_ffwd(struct scatterlist dst[2],
src = sg_next(src); src = sg_next(src);
} }
sg_init_table(dst, 2);
sg_set_page(dst, sg_page(src), src->length - len, src->offset + len); sg_set_page(dst, sg_page(src), src->length - len, src->offset + len);
scatterwalk_crypto_chain(dst, sg_next(src), 0, 2); scatterwalk_crypto_chain(dst, sg_next(src), 0, 2);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment