From 39cc1b93c50ba4b9545279df84cd61ce9935d84c Mon Sep 17 00:00:00 2001 From: fredrik Date: Wed, 5 Jul 2006 20:40:08 +0000 Subject: [PATCH] Add anti-segv check. git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@669 959494ce-11ee-0310-bf91-de5d638817bd --- daemon/fnet-dc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/fnet-dc.c b/daemon/fnet-dc.c index a74be23..f7455ae 100644 --- a/daemon/fnet-dc.c +++ b/daemon/fnet-dc.c @@ -2848,7 +2848,7 @@ static void udpread(struct socket *sk, void *data) { for(fn = fnetnodes; fn != NULL; fn = fn->next) { - if((fn->fnet == &dcnet) && addreq(fn->sk->remote, (struct sockaddr *)&hubaddr)) + if((fn->fnet == &dcnet) && (fn->sk != NULL) && addreq(fn->sk->remote, (struct sockaddr *)&hubaddr)) { myfn = fn; break; -- 2.11.0