[MISC] Fix dereference of memory beyonf the input buffer.