Language: C
Label: safe
CWE: CWE-787 \u2014 Out-of-bounds Write
The product writes data past the end, or before the beginning, of the intended buffer.

Code:
static int getid(char ch) {
	const char *const keys = "[]<>+-,.";
	const char *const cidx = strchr (keys, ch);
	return cidx? cidx - keys + 1: 0;
}