diff --git a/src/fh_see.c b/src/fh_see.c index 9e6b474..28639d9 100644 --- a/src/fh_see.c +++ b/src/fh_see.c @@ -15,6 +15,12 @@ static void show_word(struct fh_thread_s *fh, const struct fh_word_s *w) while (1) { // make sure it's aligned execptr = WORDALIGNED(execptr); + + if (execptr == 0 || execptr > fh->here) { + LOGE("Exec overrun without ENDWORD!"); + break; + } + FHPRINT("0x%08x: ", execptr); const struct fh_instruction_s *instr = fh_instr_at(fh, execptr); if (!instr) {