bug in uucp

utzoo!decvax!ucbvax!ihnss!mhtsa!harpo!uwvax!solomon utzoo!decvax!ucbvax!ihnss!mhtsa!harpo!uwvax!solomon
Sat Mar 6 08:13:18 AEST 1982


Rummaging idly through the source for uucp, I discovered a flagrant
subscript violation.  I don't know whether it causes any problems,
but it probably should be fixed.  The bug is in the file conn.c,
at the end of the function expect():

The lines:
		*rp = '\0';
		if (rp >= rdvec + MR)
			return(FAIL);

Should read:
        if (rp >= rdvec + MR)
            return(FAIL);
        *rp = '\0';

(rdvec is declared "static char rdvec[MR]", so *(rdvev+MR) is the
next position immediately AFTER rdvac).

I haven't checked, but programmers tend to do things in a stylized way,
so I wouldn't be surprised if this error occurs elsewhere.

By the way, I occationally find a core file in /usr/spool/uucp owned by
uucp.  Has anybody else noticed that?



More information about the Comp.bugs.4bsd.ucb-fixes mailing list