[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LYNX-DEV lynx.cfg VIEWER entry which crashes lynx
From: |
Klaus Weide |
Subject: |
Re: LYNX-DEV lynx.cfg VIEWER entry which crashes lynx |
Date: |
Sat, 30 Nov 1996 02:38:24 -0600 (CST) |
On Sat, 30 Nov 1996, Nelson Henry Eric wrote:
> In my futile attempts to view a compressed text file via most in
> lynx, I hit upon a way to crash lynx. Using lynx2-6 with the
> 11/24 composite, slang0.99-34, compiled with gcc-2.7.2 on sunos4.1.3.
> Don't know if it's interesting or not. Particulars below. __Henry
>
> With the entry in lynx.cfg:
>
> VIEWER:text/x-compressed:/usr/bin/gzip %s > ~/%s | /home/.most/most ~/%s
Just
VIEWER:text/x-compressed:/home/.most/most %s
should do, since the file that your VIEWER gets to see will have
already been uncompressed at that point. The first %s will be the
name of a temporary file into which Lynx uncompresses your original
file. And your trace shows that that is happening.
One should never put more %s's in the definitions in lynx.cfg than
are supported; i.e. (according to the comments in lynx.cfg) two for
DOWNLOADER and PRINTER, one for some others.
Your crash is probably due do this statement from src/HTFWriter.c:
sprintf (me->end_command, pres->command, fnam, "");
where pres->command will hold the string you specified as a viewer
command. A second %s in that string would in effect be ignored,
but the third on makes sprintf() try to handle more aguments than it has..
It's not nice of Lynx to crash in such a case, but at least it is not
something that can be done by a user of a captive account (but only
by the installer of the .cfg file, and maybe the mailcap file).
Some warning text in lynx.cfg might be in order..
Klaus
;
; To UNSUBSCRIBE: Send a mail message to address@hidden
; with "unsubscribe lynx-dev" (without the
; quotation marks) on a line by itself.
;