Article View: news.software.nn
Article #462Bugfix: Core dump from menu
From: Jonathan Laventhol
Date: Sun, 15 Nov 1992 17:07
Date: Sun, 15 Nov 1992 17:07
35 lines
1301 bytes
1301 bytes
Hello -- Here's a bug fix to a small problem in NN version 6.4
Cheers,
J.
-----------------------------------------------------------
Jonathan Laventhol, Systems Administrator, <jcl@deshaw.com>
D.E. Shaw & Co., 120 West 45th Street, New York, NY 10036.
-----------------------------------------------------------
PROGRAM:
NN Version 6.4
DESCRIPTION:
In the reading menu, choosing the first non-existent
article dumps core (segmentation fault).
DIAGNOSIS:
Simple fencepost problem.
FIX:
Function get_k_cmd_1, file menu.c, line 728. Comparison of
0-origin article_id (derived from keypress) and
1-origin menu_articles (number of articles).
Change from
article_id > menu_articles
to
article_id >= menu_articles
DIFF:
728c728
< if (article_id < 0 || article_id > menu_articles) {
---
> if (article_id < 0 || article_id >= menu_articles) {
(end)
Technical Details
Message-ID:
<Bxrowr.30p@deshaw.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!deshaw.com!jclShow Full Headers
Complete Article Headers
Newsgroups: news.software.nn Path: arc1-ca.pugleaf.net!sparky!uunet!deshaw.com!jcl From: jcl@deshaw.com (Jonathan Laventhol) Subject: Bugfix: Core dump from menu Message-ID: <Bxrowr.30p@deshaw.com> Summary: nn 6.4 dumps core: this is bug fix. Keywords: bug, fix, nn, menu selection Sender: usenet@deshaw.com Nntp-Posting-Host: cs2 Organization: D. E. Shaw & Co. Date: Sun, 15 Nov 1992 17:07:39 GMT Lines: 35