commit | a66e25dfa36d7abc7a21e70945d35312585e054f | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Thu Sep 29 09:38:18 1994 +0000 |
committer | Guido van Rossum <guido@python.org> | Thu Sep 29 09:38:18 1994 +0000 |
tree | 7e72425b3745b74517f68f4ca65c232fa2de665d | |
parent | bfd5d755a0edd12a8249fd690fd93b090829bf6c [diff] |
* Python/pythonmain.c: fatal error if can't alloc mem for -c string
diff --git a/Python/pythonmain.c b/Python/pythonmain.c index a41a559..4cf44dc 100644 --- a/Python/pythonmain.c +++ b/Python/pythonmain.c
@@ -71,7 +71,8 @@ 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;