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

string
This commit is contained in:
Guido van Rossum 1994-09-29 09:38:18 +00:00
parent bfd5d755a0
commit a66e25dfa3

View file

@ -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;