sa gets floating exception
Steven M. SchultzY
sms at wlv.imsd.contel.com
Fri Jun 16 09:27:20 AEST 1989
Index: etc/sa.c 2.10BSD
Description:
'sa' gets a floating point exception and drops core after
being recompiled with the shadow password package installed
in the system.
Repeat-By:
Install the shadow password file on the system. Recompile/link
'sa'. Run it and observe the floating point exception.
Fix:
Apply the following patch. The problem was that 'sa' was
redefining the 'bcmp()' routine which 'getpwent()' calls.
*** sa.c.old Wed Jun 14 23:29:06 1989
--- sa.c Wed Jun 14 23:29:39 1989
***************
*** 280,286 ****
int pgdiv;
#define pgtok(x) ((x) / pgdiv)
! extern tcmp(), ncmp(), bcmp(), dcmp(), Dcmp(), kcmp(), Kcmp();
extern double sum();
main(argc, argv)
--- 280,286 ----
int pgdiv;
#define pgtok(x) ((x) / pgdiv)
! extern tcmp(), ncmp(), Bcmp(), dcmp(), Dcmp(), kcmp(), Kcmp();
extern double sum();
main(argc, argv)
***************
*** 317,323 ****
case 'b':
bflg++;
! cmp = bcmp;
break;
case 'l':
--- 317,323 ----
case 'b':
bflg++;
! cmp = Bcmp;
break;
case 'l':
***************
*** 741,747 ****
return(p2->p.count - p1->p.count);
}
! bcmp(p1, p2)
cell *p1, *p2;
{
double f1, f2;
--- 741,747 ----
return(p2->p.count - p1->p.count);
}
! Bcmp(p1, p2)
cell *p1, *p2;
{
double f1, f2;
More information about the Comp.bugs.2bsd
mailing list