Mercurial > cpython-lru_cache-weakref
diff Python/pythonmain.c @ 1910:35947f60528e legacy-trunk
* Python/pythonmain.c: fatal error if can't alloc mem for -c
string
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 29 Sep 1994 09:38:18 +0000 |
| parents | b724599401ff |
| children | d0d0a69b5ca3 |
line wrap: on
line diff
--- a/Python/pythonmain.c Thu Sep 29 09:38:04 1994 +0000 +++ b/Python/pythonmain.c Thu Sep 29 09:38:18 1994 +0000 @@ -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;
