[PATCH 2/3] nfit_test: fix buffer overrun, add sanity check