diff --git a/sys/kern/imgact_shell.c b/sys/kern/imgact_shell.c index 38bab6bf214e..78479dab443b 100644 --- a/sys/kern/imgact_shell.c +++ b/sys/kern/imgact_shell.c @@ -76,7 +76,7 @@ exec_shell_imgact(imgp) /* * Find end of line; return if the line > MAXSHELLCMDLEN long. */ - for (ihp = &image_header[2]; *ihp != '\n'; ++ihp) { + for (ihp = &image_header[2]; *ihp != '\n' && *ihp != '#'; ++ihp) { if (ihp >= &image_header[MAXSHELLCMDLEN]) return(ENOEXEC); }