From: fredrik Date: Wed, 10 Jan 2007 23:55:23 +0000 (+0000) Subject: Fix a segv bug in findsehash. X-Git-Tag: 0.3~98 X-Git-Url: http://dolda2000.com/gitweb/?p=doldaconnect.git;a=commitdiff_plain;h=175c86de77cd5e6d447cfba50dc8f755db87eb16 Fix a segv bug in findsehash. git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@829 959494ce-11ee-0310-bf91-de5d638817bd --- diff --git a/daemon/fnet-dc.c b/daemon/fnet-dc.c index 175563b..d45b144 100644 --- a/daemon/fnet-dc.c +++ b/daemon/fnet-dc.c @@ -2427,8 +2427,10 @@ static struct hash *findsehash(struct sexpr *sexpr) return(h1); break; case SOP_OR: - h1 = findsehash(sexpr->l); - h2 = findsehash(sexpr->r); + if((h1 = findsehash(sexpr->l)) == NULL) + return(NULL); + if((h2 = findsehash(sexpr->r)) == NULL) + return(NULL); if(hashcmp(h1, h2)) return(h1); break;