From: Guido van Rossum Date: Thu, 29 Sep 1994 09:38:18 +0000 (+0000) Subject: * Python/pythonmain.c: fatal error if can't alloc mem for -c X-Git-Tag: v1.1~69 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a66e25dfa36d7abc7a21e70945d35312585e054f;p=thirdparty%2FPython%2Fcpython.git * Python/pythonmain.c: fatal error if can't alloc mem for -c string --- diff --git a/Python/pythonmain.c b/Python/pythonmain.c index a41a55953f62..4cf44dc666d2 100644 --- a/Python/pythonmain.c +++ b/Python/pythonmain.c @@ -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;