mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +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
|
that look like options are left for the
|
||||||
the command to interpret. */
|
the command to interpret. */
|
||||||
command = malloc(strlen(optarg) + 2);
|
command = malloc(strlen(optarg) + 2);
|
||||||
/* Ignore malloc errors this early... */
|
if (command == NULL)
|
||||||
|
fatal("not enough memory to copy -c argument");
|
||||||
strcpy(command, optarg);
|
strcpy(command, optarg);
|
||||||
strcat(command, "\n");
|
strcat(command, "\n");
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue