Bug in bsd-misc.c
wwieser at gmx.de
wwieser at gmx.de
Tue Mar 13 08:23:02 EST 2001
Hi guys...
Just wanted to see what is so different in BSD from Linux and had a
quick look at the openbsd-compat directory (openssh-2.5.1p1).
There is a REALLY obvious bug in bsd-misc.c, quoted below:
#if !defined(HAVE_STRERROR) && defined(HAVE_SYS_ERRLIST) &&
defined(HAVE_SYS_NERR)
const char *strerror(int e)
{
extern int sys_nerr;
extern char *sys_errlist[];
if ((e >= 0) || (e < sys_nerr))
return("unlisted error");
else
return(sys_errlist[e]);
}
#endif
(Shouldn't the return statements be swapped?!)
Regards,
wwieser
More information about the openssh-unix-dev
mailing list