Prevent potential NULL pointer dereference in expand_compare
commitacc44bf36bdcb5753a26dec015a406b97f9b08b3
authorJosh Triplett <josh@freedesktop.org>
Sun, 11 Mar 2007 07:51:51 +0000 (10 23:51 -0800)
committerJosh Triplett <josh@freedesktop.org>
Sun, 11 Mar 2007 07:52:15 +0000 (10 23:52 -0800)
treec6b4b300a1fc72651db052a40157e6b1dacbc295
parent2efa8b2c0a19bfbf69a91ae80540ccc15ea993eb
Prevent potential NULL pointer dereference in expand_compare

expand_compare could dereference left->ctype without checking that left !=
NULL.  Fix that, by extending the check for (left && right) around most of the
function.

Thanks to Florian Krohm of IBM for reporting the problem.

Signed-off-by: Josh Triplett <josh@freedesktop.org>
expand.c