Article View: net.bugs
Article #16UUCP Bug (brl-bmd.115 followup)
From: cmcl2salkind
Date: Sun, 28 Mar 1982 17:19
Date: Sun, 28 Mar 1982 17:19
27 lines
782 bytes
782 bytes
There are several other minor bugs in expect():
1) there can be a reference past the end of the statically
allocated array rdvec (reported by someone else already)
2) the alarm isn't reset (disabled)
The fix is simple. In expect(), change the lines
if ((*rp = nextch & 0177) != '\0')
rp++;
*rp = '\0';
if (rp >= rdvec + MR)
return(FAIL);
to
if ((*rp = nextch & 0177) != '\0')
rp++;
if (rp >= rdvec + MR) {
alarm(0);
return(FAIL);
}
*rp = '\0';
_________
Lou Salkind
cmcl2!salkind
Technical Details
Message-ID:
<anews.Acmcl2.385>Path:
arc1-ca.pugleaf.net!utzoo!decvax!ucbvax!ihnss!cbosg!harpo!floyd!cmcl2!salkindShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!decvax!ucbvax!ihnss!cbosg!harpo!floyd!cmcl2!salkind From: cmcl2!salkind Newsgroups: net.bugs Subject: UUCP Bug (brl-bmd.115 followup) Date: Sun, 28 Mar 1982 17:19:54 +0000 Message-ID: <anews.Acmcl2.385>