From owner-freebsd-bugs Sat Jul 31 21:51:15 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id A73EB14FB1 for ; Sat, 31 Jul 1999 21:51:08 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id VAA61374; Sat, 31 Jul 1999 21:50:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Sat, 31 Jul 1999 21:50:02 -0700 (PDT) Message-Id: <199908010450.VAA61374@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: "Danny J. Zerkel" Subject: Re: bin/9350: nvi incorrectly reads files with very long lines Reply-To: "Danny J. Zerkel" Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR bin/9350; it has been noted by GNATS. From: "Danny J. Zerkel" To: freebsd-gnats-submit@freebsd.org, xaa@xaa.iae.nl Cc: Subject: Re: bin/9350: nvi incorrectly reads files with very long lines Date: Sun, 01 Aug 1999 00:41:32 -0400 Mark, Here's my fix. Turns out to be a bug in the db library. When the read buffer has to be expanded beyond 65535, the current character pointer gets warped back to the beginning of the buffer, since the size indx_t is only 16 bits. I wonder what else this fixes? :-) --- /usr/src/lib/libc/db/recno/rec_get.c.orig Wed Sep 16 00:17:42 1998 +++ /usr/src/lib/libc/db/recno/rec_get.c Sun Aug 1 00:34:16 1999 @@ -181,7 +181,7 @@ { DBT data; recno_t nrec; - indx_t len; + size_t len; size_t sz; int bval, ch; u_char *p; -- Danny J. Zerkel dzerkel@columbus.rr.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message