]> git.baikalelectronics.ru Git - kernel.git/commit
lib/mpi: fix off by one in mpi_read_raw_from_sgl
authorStephan Mueller <smueller@chronox.de>
Sun, 18 Oct 2015 10:45:18 +0000 (12:45 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 20 Oct 2015 14:10:47 +0000 (22:10 +0800)
commitd57797a621d96e7969d15076e9dbb905b90d1eec
treeb6555ee222c808f802b32031ad272a6e7ad6acfe
parent8a4208424c4bb91619dda489330c29b09a6946ef
lib/mpi: fix off by one in mpi_read_raw_from_sgl

The patch fixes the analysis of the input data which contains an off
by one.

The issue is visible when the SGL contains one byte per SG entry.
The code for checking for zero bytes does not operate on the data byte.

Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
lib/mpi/mpicoder.c