Michał Górny  committed 986c943

Fix segv with extension-less input file and no output file specified.

  • Participants
  • Parent commits 5785bba
  • Branches master

Comments (0)

Files changed (1)

File mirage2iso.c

 		if (!use_stdout) {
 			const char* ext = strrchr(in, '.');
-			if (!strcmp(ext, ".iso")) {
+			if (ext && !strcmp(ext, ".iso")) {
 				if (!force) {
 					fprintf(stderr, "Input file has .iso suffix and no output file specified\n"
 							"Either specify one or use --force to use '.iso.iso' output suffix\n");