diff --git a/kernel/kexec.c b/kernel/kexec.c index ae1c35201cc873d697921cb2c5da95896d89493d..f336e2107f980e2546ecc118d2dd3239f655ebae 100644 --- a/kernel/kexec.c +++ b/kernel/kexec.c @@ -1228,7 +1228,7 @@ static int __init parse_crashkernel_mem(char *cmdline, } while (*cur++ == ','); if (*crash_size > 0) { - while (*cur != ' ' && *cur != '@') + while (*cur && *cur != ' ' && *cur != '@') cur++; if (*cur == '@') { cur++;