Skip to content

Commit

Permalink
crypto: scatterwalk - Add missing sg_init_table to scatterwalk_ffwd
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Herbert Xu committed May 28, 2015
1 parent 693b549 commit fdaef75
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crypto/scatterwalk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit fdaef75

Please sign in to comment.