Article View: news.software.nn
Article #8508Seg faults on command-line parsing (nn-tk-15.1)
From: Eric Berggren
Date: Tue, 01 Apr 1997 00:00
Date: Tue, 01 Apr 1997 00:00
37 lines
2011 bytes
2011 bytes
Command-line parsing for certain options causes a seg fault (for text
version). Options include "-X", "-g", "-N", and "-S" to name a few. The
fault is caused by lookup_address() returning NULL and immediately
being used as a reference in var_flag_toggled() (options.c:588 or
thereabouts). The cause is apparently due to missing entries in the
variables[] table (in options.c). Adding in :
"also-unsub-groups", BOOL 0, (char **)&also_unsub_groups,
(and "import" entry) for the "-X" option seems to get it working properly.
This mechanism is new since 6.5.0 and it isn't clear what variables belong
in the table and what doesn't (I suppose one could try all options and
add in the missing options as described in nn.c:106 ("nn_options"); not
everything seems to rely on the variables[] table, however).
Also, there's a missing clrdisp() call or two from the openning screen.
I added one in around line nn.c:1061 prior to printing the version so it
doesn't scribble over old text on the screen. This may not be the best place
for it, but at least made it somewhat prettier.
I noticed version 15.2 is out, but the README didn't mention anything
of the above, so I assume it wasn't addressed yet.
thanks,
-eric
--
Eric Berggren | "Parts of this product may be derived from
Portland State University | from UNIX and Berkeley 4.3 BSD systems..."
eric@ee.pdx.edu | -- Label on Solaris 2.x disk
Technical Details
Message-ID:
<5hsjb6$k6t$1@crow.cat.pdx.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nn.mbox.zip!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <5hsjb6$k6t$1@crow.cat.pdx.edu> Subject: Seg faults on command-line parsing (nn-tk-15.1) Date: Tue, 01 Apr 1997 00:00:00 +0000 From: eric@ee.pdx.edu (Eric Berggren) Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nn.mbox.zip!not-for-mail X-Deja-AN: 230031333 Organization: Portland State University Newsgroups: news.software.nn