]> asedeno.scripts.mit.edu Git - linux.git/commit
rslib: decode_rs: Fix length parameter check
authorFerdinand Blomqvist <ferdinand.blomqvist@gmail.com>
Thu, 20 Jun 2019 14:10:35 +0000 (17:10 +0300)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 26 Jun 2019 12:55:46 +0000 (14:55 +0200)
commita343536f8f482be6932803a023f46d0fa723ae56
tree422e78f437f3c84254c519e51eee8689e673b5c7
parent2034a42d1747fc1e1eeef2c6f1789c4d0762cb9c
rslib: decode_rs: Fix length parameter check

The length of the data load must be at least one. Or in other words,
there must be room for at least 1 data and nroots parity symbols after
shortening the RS code.

Signed-off-by: Ferdinand Blomqvist <ferdinand.blomqvist@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20190620141039.9874-4-ferdinand.blomqvist@gmail.com
lib/reed_solomon/decode_rs.c