Hello!
I have found a bug in smbclient v2.2.9.

----- source/client/client.c -----
static void readline_callback(void)
{
        fd_set fds;
        struct timeval timeout;
        static time_t last_t;
        time_t t;

        t = time(NULL);

        if (t - last_t < 5) return;

        last_t = t;

 again:
        FD_ZERO(&fds);
        FD_SET(cli->fd,&fds);
               ^^^^^^^
Segmentation fault was here since cli->fs == -1              
This was happen when smbd crashes (bug in my VFS module) and return READ_EOF.
And cli->fd became -1.

So, the probable solution is:
        if (t - last_t < 5 || cli->fd == -1) return;

Thanks.

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba

Reply via email to