Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jun 2005 12:36:33 +0200
From:      "Cole" <cole@opteqint.net>
To:        <hackers@freebsd.org>
Subject:   FD_ZERO problem
Message-ID:  <000b01c57583$fa036820$4206000a@deadmind>

next in thread | raw e-mail | index | archive | help
Hi

Ive been looking at nbtscan, the 1.5.1 version, and it seems to core, with a segmentation fault.
I traced the problem down to a FD_ZERO(fdsr).

I was wondering is there any like checking that can be done before issuing that command. Its part of a while loop, inside the
program, where it runs fine, till the last loop, im guessing maybe its maybe doing an extra loop where it shouldnt, but the while
loop is
while( (select(sock+1, fdsr, fdsw, NULL, &select_timeout) ) > 0 ) {

So I dont think the while is giving a false positive, but this isnt my code, I havent had time to check it all out, but I was just
wondering if there are any checks that can be done to the fd_set * fdsr pointer before issuing a FD_ZERO?

Regards
/Cole




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000b01c57583$fa036820$4206000a>