lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev more info on the download message bug


From: Larry W. Virden
Subject: lynx-dev more info on the download message bug
Date: Thu, 19 Nov 1998 06:49:40 -0500 (EST)

Okay, here's a repeatable, for me, case.

Run:
lynx http://www.qni.com/~brisk/PalmPilot/ReadDocJ/ReadDocJ.zip

When it is time for the download, what _I_ see is

s  D)ownload, or C)ancel

Here is the stack trace at the time of the msg.

It looks like lynx wants to say:

application/zip  D)ownload, or C)ancel


=>[1] HTSprintf(pstr = 0xefffc3dc, fmt = 0x25238c "%s  D)ownload, or C)ancel", 
...), line 554 in "HTString.c"
  [2] user_message(message = 0x25238c "%s  D)ownload, or C)ancel", argument = 
0x30ee48 "application/zip"), line 5314 in "GridText.c"
  [3] HTSaveToFile(pres = 0xefffc5d4, anchor = 0x30f658, sink = (nil)), line 
633 in "HTFWriter.c"
  [4] HTStreamStack(rep_in = 0x3075f8, rep_out = 0x2fa018, sink = (nil), anchor 
= 0x30f658), line 407 in "HTFormat.c"
  [5] HTMIME_put_character(me = 0x3106e8, c = '\n'), line 512 in "HTMIME.c"
 
Here's the HTSprintf code:

#if USE_STDARG_H
PUBLIC char * HTSprintf (char ** pstr, CONST char * fmt, ...)
#else
PUBLIC char * HTSprintf (pstr, fmt, va_alist)
    char **             pstr;
    CONST char *        fmt;
    va_dcl
#endif
{
    va_list ap;

    LYva_start(ap,fmt);
    StrAllocVsprintf(pstr, (pstr && *pstr) ? strlen(*pstr) : 0, fmt, ap);
    va_end(ap);

    return (*pstr);
}

During this entry, pstr had already been allocated - BUT, *pstr is
'\0'.  fmt was the D)ownload msg, and when I attempt to print ap, I get (void)
- before and after the LYva_start() call.

When we get down into the StrAll... I find that because a 0 is passed, we
never get into the loop that attempts to interpret the fmt string, resulting
in the s thru the rest of the string being used as the prompt.

Does that help anyone fix this bug?

P.S.  I don't know if I remember correctly - did someone mention the bug
where when you interrupt lynx, two copies of the error msg, both with %
signs in them, are output?  I suspect this is related to this bug.


-- 
Larry W. Virden                 <URL:mailto:address@hidden>
<URL:http://www.purl.org/NET/lvirden/> <*> O- "No one is what he seems."
Unless explicitly stated to the contrary, nothing in this posting should 
be construed as representing my employer's opinions.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]