[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: [BusyBox] Bug in xconnect.c v.1.00-pre4
From: Simon Dunn <sdunn () mpc-data ! co ! uk>
Date: 2003-12-23 15:49:14
[Download RAW message or body]
Hi,
I've recently been doing some development work using version 1.00-pre4
and noticed that the previously well behaved telnet client stopped
working.
I've tracked this bug to the following line of code in the function
bb_getport() at line 30 in xconnect.c:
.
.
.
port_nr=strtol(port, &endptr, 10);
if (errno != 0 || *endptr!='\0' || endptr==port || port_nr < 1 || port_nr
> 65536)
{
.
.
.
The problem is with using errno to check that something has succeeded. In
my
world a file had failed to open prior to this 'strtol()' function call so
errno
was still set to ENOENT.
So bb_getport returned an invalid port number which telnet unsurprisingly
failed to
connect on.
Simon Dunn
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
_______________________________________________
busybox mailing list
busybox@mail.busybox.net
http://codepoet.org/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic