mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
* Python/pythonmain.c: fatal error if can't alloc mem for -c
string
This commit is contained in:
parent
bfd5d755a0
commit
a66e25dfa3
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue