OSDN Git Service

[COVERITY] Fix bad error checking for NULL parameter in ss library
authorBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 19 Mar 2007 12:39:32 +0000 (08:39 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 19 Mar 2007 12:39:32 +0000 (08:39 -0400)
commitd2021de5cf94d7a55181004beee296b310901718
treef9f83f59ba30189f976c6c722a90fd594da52238
parent12f91959993f0d2882592427c94f35f32436e03a
[COVERITY] Fix bad error checking for NULL parameter in ss library

Looks like flawed reasoning.  Here if info_dir is NULL then you are
guaranteed to blow up since you will dereference it.  It seems like the
correct thing to do here (what the code author meant to do) was to set
*code_ptr = SS_ET_NO_INFO_DIR if info_dir was NULL or if *info_dir was
an empty string (aka *info_dir == '\0').

Coverity ID: 8: Forward Null

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
lib/ss/ChangeLog
lib/ss/help.c