diff --git a/flashrom.c b/flashrom.c index a6d6e9148..093f2eac1 100644 --- a/flashrom.c +++ b/flashrom.c @@ -449,6 +449,10 @@ int main(int argc, char *argv[]) printf("Run flashrom -L to view the hardware supported in this flashrom version.\n"); exit(1); } + if (!filename) { + printf("Error: No filename specified.\n"); + exit(1); + } size = flashes[0]->total_size * 1024; buf = (uint8_t *) calloc(size, sizeof(char));