From: Andre Noll Date: Sun, 6 Apr 2008 10:33:46 +0000 (+0200) Subject: Fix NULL pointer dereference for stdin commands. X-Git-Tag: v0.3.2~8 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=3fd92b8735671b309fa775312b7cba1f6c7a6b32;ds=sidebyside Fix NULL pointer dereference for stdin commands. --- diff --git a/client_common.c b/client_common.c index 35220608..d8eaba66 100644 --- a/client_common.c +++ b/client_common.c @@ -116,6 +116,8 @@ static void client_pre_select(struct sched *s, struct task *t) } return; case CL_SENDING: + if (!ct->in_loaded) /* stdin task not yet started */ + return; if (*ct->in_loaded) { PARA_INFO_LOG("loaded: %zd\n", *ct->in_loaded); para_fd_set(ct->fd, &s->wfds, &s->max_fileno);