Skip to content

Commit

Permalink
[RSLIB] BUG() when passing illegal parameters to decode_rs8() or deco…
Browse files Browse the repository at this point in the history
…de_rs16()

Returning -ERANGE should never happen.

Signed-off-by: Jörn Engel <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
  • Loading branch information
Jörn Engel authored and dwmw2 committed Oct 20, 2007
1 parent c32b8dc commit 1dd7fdb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/reed_solomon/decode_rs.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@

/* Check length parameter for validity */
pad = nn - nroots - len;
if (pad < 0 || pad >= nn)
return -ERANGE;
BUG_ON(pad < 0 || pad >= nn);

/* Does the caller provide the syndrome ? */
if (s != NULL)
Expand Down

0 comments on commit 1dd7fdb

Please sign in to comment.