openbsd-ports/shells/bash/patches/patch-lib_sh_getenv_c
naddy 0d77728dd5 - Update bash to 3.0: Lots of small changes, i18n support.
- Drop the preformatted print documentation.
- Move back to the shells/bash location.
2004-07-30 17:02:49 +00:00

13 lines
555 B
Plaintext

$OpenBSD: patch-lib_sh_getenv_c,v 1.1 2004/07/30 17:02:49 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);