k053936.c: fix potential out-of-bounds memory access; remove some dead code [Alex Jackson]