From a57c4026f20068117b927424ceadbeeb55269178 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Mon, 19 Feb 2001 12:23:46 +0000 Subject: [PATCH] (malloc_initialize_hook): Handle case thet `environ' is null. --- src/ChangeLog | 3 +++ src/emacs.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 44015eb9296..69ab0fe6bdf 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2001-02-19 Gerd Moellmann + * emacs.c (malloc_initialize_hook): Handle case thet `environ' + is null. + * ralloc.c (__morecore) [!SYSTEM_MALLOC]: Move declaration to the start of the file. diff --git a/src/emacs.c b/src/emacs.c index e2b1bffe819..023c036e566 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -675,7 +675,7 @@ malloc_initialize_hook () { char **p; - for (p = environ; *p; p++) + for (p = environ; p && *p; p++) if (strncmp (*p, "MALLOC_CHECK_=", 14) == 0) { do -- 2.39.5