diff options
Diffstat (limited to 'exec.c')
| -rw-r--r-- | exec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/exec.c b/exec.c index 08f6cafcbc..f7f3cdbf4a 100644 --- a/exec.c +++ b/exec.c @@ -991,6 +991,10 @@ const char *parse_cpu_option(const char *cpu_option) const char *cpu_type; model_pieces = g_strsplit(cpu_option, ",", 2); + if (!model_pieces[0]) { + error_report("-cpu option cannot be empty"); + exit(1); + } oc = cpu_class_by_name(CPU_RESOLVING_TYPE, model_pieces[0]); if (oc == NULL) { |