openbsd-ports/shells/bash2/patches/patch-lib_sh_getenv_c
naddy 46342869b5 - Fix coredump on startup for ELF platforms.
- Apply all official patches that have appeared so far.
2002-09-29 01:31:06 +00:00

13 lines
555 B
Plaintext

$OpenBSD: patch-lib_sh_getenv_c,v 1.1 2002/09/29 01:31:06 naddy Exp $
--- lib/sh/getenv.c.orig Sun Sep 29 02:38:58 2002
+++ lib/sh/getenv.c Sun Sep 29 02:39:15 2002
@@ -78,7 +78,7 @@ getenv (name)
shell_variables will be 0 when this is invoked. We look up the
variable in the real environment in that case. */
- for (i = 0, len = strlen (name); environ[i]; i++)
+ for (i = 0, len = strlen (name); environ && environ[i]; i++)
{
if ((STREQN (environ[i], name, len)) && (environ[i][len] == '='))
return (environ[i] + len + 1);