Fix NULL pointer dereference for stdin commands.
authorAndre Noll <maan@systemlinux.org>
Sun, 6 Apr 2008 10:33:46 +0000 (12:33 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 6 Apr 2008 10:33:46 +0000 (12:33 +0200)
client_common.c

index 3522060..d8eaba6 100644 (file)
@@ -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);