lib/bch: fix undefined behavior from signed left-shifts
Status from this message: [merged mm-nonmm-stable] lib-bch-fix-signed-shift-overflow-in-build_mod8_tables.patch removed from -mm tree
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 All 2 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | lib/bch: fix signed left-shift undefined behaviorlib/ | +2 | 0 replies | Applied |
| 2/2 | lib/bch: fix signed shift overflow in build_mod8_tableslib/ | +1 | 0 replies | Applied |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] lib/bch: fix undefined behavior from signed left-shifts
Fix two instances of undefined behavior in lib/bch.c caused by left-shifting signed integers into or past the sign bit.
While the kernel's -fno-strict-overflow flag prevents miscompilation today, these are formally UB per C11 6.5.7p4 and trivial to fix.
Josh Law (2):
lib/bch: fix signed left-shift undefined behavior lib/bch: fix signed shift overflow in build_mod8_tables
lib/bch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.34.1