Fixes stack-buffer-overflow errors running under asan. Reviewed-by: Marvin Scholz <epirat07@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>