bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Extra check for NULL in array_insert() in array.c


From: William Park
Subject: Extra check for NULL in array_insert() in array.c
Date: Tue, 27 Jul 2004 23:53:09 -0400

Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' 
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/local/share/locale' -DPACKAGE='bash' 
-DSHELL -DHAVE_CONFIG_H  -I.  -I. -I./include -I./lib   -O4 -march=i686
uname output: Linux node1 2.6.7 #4 SMP Thu Jun 17 01:01:26 EDT 2004 i686 
unknown unknown GNU/Linux
Machine Type: i686-pc-linux-gnu

Bash Version: 3.0
Patch Level: 0
Release Status: release

Description:
    In file array.c, function array_insert(), line 454, savestring(v) is
    called without checking for NULL argument.  Such check is done in other
    places.

Fix:
    Change 
        ae->value = savestring(v);
    to
        ae->value = v ? savestring(v) : (char *)NULL;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]