Commit a66e25df authored by Guido van Rossum's avatar Guido van Rossum

* Python/pythonmain.c: fatal error if can't alloc mem for -c

	string
parent bfd5d755
......@@ -71,7 +71,8 @@ realmain(argc, argv)
that look like options are left for the
the command to interpret. */
command = malloc(strlen(optarg) + 2);
/* Ignore malloc errors this early... */
if (command == NULL)
fatal("not enough memory to copy -c argument");
strcpy(command, optarg);
strcat(command, "\n");
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment