[PATCH 2/2] [v2] lib/bch: fix possible stack overrun