[PATCH 3.18 005/121] bna: Avoid reading past end of buffer