kvx: asan: out-of-bounds read

kvx-parse.c:parse_with_restarts does
  if (!tok.insn[tok.begin])
    tok.class_id = -3;
then a little later
  printf_debug (1, "\nEntering rule: %d (Trying to match: (%s)[%d])\n", jump_target,
		TOKEN_NAME (CLASS_ID (tok)), CLASS_ID (tok));

This results in a buffer overrun in TOKEN_NAME.  Fix that.

	* config/tc-kvx.h (TOKEN_NAME): Check for tok <= 0, not just -1.
1 file changed