[net.bugs.4bsd] Bug in vnews

wildbill@ucbvax.ARPA (William J. Laubenheimer) (10/24/84)

I have uncovered a bug in vnews. Some other people apparently have
run up against it as well; I have seen a message in net.jokes.d
complaining of the same thing.

Some articles have a Lines: field which does not match up with the
actual number of lines in the article. While this is normally benign,
there is one case where a fatal error results. If the Lines: field
is 0 (zero), and the article spans more than one page, vnews
terminates with "Floating exception (core dumped)", leaving the
terminal in CBREAK mode. Exceptionally bad news if you are trying
to catch up on a couple of weeks' worth of news and didn't bother
to set -u.

The nature of this message points very obviously at the More(xx%) prompt
which appears at the bottom of multi-page articles. Lines: 0 articles
which fit on one page do not cause this error. The obvious fix is to
put in a zero check when this percentage is calculated. The non-obvious
fix is to find out why the line counts get out of sync and fix it so they
don't (but not by reintroducing readnews' feature of reading through the
article once to count the lines!). Either fix is acceptable (although
perhaps to be obsolesced by rn).

                                        Bill Laubenheimer
----------------------------------------UC-Berkeley Computer Science
     ...Killjoy went that-a-way--->     ucbvax!wildbill