Xref: utzoo comp.bugs.4bsd:684 comp.unix.questions:5287 Path: utzoo!utgpu!water!watmath!clyde!rutgers!gatech!ncsuvx!lll-winken!lll-crg.llnl.gov!casey From: casey@lll-crg.llnl.gov (Casey Leedom) Newsgroups: comp.bugs.4bsd,comp.unix.questions Subject: Re: Dbm library Keywords: ndbm library Message-ID: <3047@lll-winken.llnl.gov> Date: 29 Jan 88 00:00:26 GMT References: <580@xyzzy.UUCP> <3046@lll-winken.llnl.gov> Sender: usenet@lll-winken.llnl.gov Reply-To: casey@lll-crg.llnl.gov.UUCP (Casey Leedom) Organization: Lawrence Livermore National Laboratory Lines: 25 Oopps, that fix should be: *** /usr/src/lib/libc/gen/ndbm.c Sun Mar 9 19:51:28 1986 --- /tmp/xxx Thu Jan 28 15:52:11 1988 *************** *** 496,502 **** if (i2 > 0) i1 = sp[i2]; i1 -= item.dsize + item1.dsize; ! if (i1 <= (i2+3) * sizeof(short)) return (0); sp[0] += 2; sp[++i2] = i1 + item1.dsize; --- 496,502 ---- if (i2 > 0) i1 = sp[i2]; i1 -= item.dsize + item1.dsize; ! if (i1 <= (i2+3) * (int)(sizeof(short))) return (0); sp[0] += 2; sp[++i2] = i1 + item1.dsize; Note the additional parenthesis around "sizeof(short)". Casey