[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev Lynx 2.8.2pre7 + wrong link segfaults
From: |
Leonid Pauzner |
Subject: |
Re: lynx-dev Lynx 2.8.2pre7 + wrong link segfaults |
Date: |
Thu, 3 Jun 1999 09:10:07 +0400 (MSD) |
30-May-99 21:38 address@hidden wrote:
>>
>> > > Hi again. 2.8.2pre9 is working fine with this bad link. I just get the
>> > > Alert. This lynx was compiled with --enable-debug in case I have
>> > > problems.
>> >
>> > good (I suspected it would, but studying the code I could not see where
>> > the HTSprintf function would dump core - it certainly did not on my
>> > machine).
>>
>> One very slight danger I can see in making assumptions is that the core
>> dump *could* be dependent on having debug disabled.
> The core dump came from using HTSprintf with a formatting parameter that
> wasn't - it could, and did contain a % character that had nothing to do
> with its design (the %7C for "|"). The bug wasn't in HTSprintf, but the
> function that called it.
Sorry, my fault, I thought HTSprintf may live without formating parameter
so fall back to StrAllocCopy/StrAllocCat, at least HTSprintf0 called this way
in LYMap.c and LYCookie.c for LYNXIMGMAP: and LYNXCOKIE:,
other files should also be inspected for the same problem.
from LYMap:c:
^^^^^^^^^^^^^
#define PUTS(buf) (*target->isa->put_block)(target, buf, strlen(buf))
HTSprintf0(&buf, "<html>\n<head>\n");
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PUTS(buf);
HTSprintf0(&buf, "<META %s content=\"text/html;charset=%s\">\n",
"http-equiv=\"content-type\"",
LYCharSet_UC[current_char_set].MIMEname);
PUTS(buf);
/*
* This page is a list of titles and anchors for them.
* Since titles already passed SGML/HTML stage
* they converted to current_char_set.
* That is why we insist on META charset for this page.
*/
HTSprintf0(&buf, "<title>%s</title>\n", MapTitle);
PUTS(buf);
HTSprintf0(&buf, "</head>\n<body>\n");
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PUTS(buf);
HTSprintf0(&buf,"<h1><em>%s</em></h1>\n", MapTitle);
PUTS(buf);
StrAllocCopy(MapAddress, address);
LYEntify(&MapAddress, FALSE);
HTSprintf0(&buf,"<h2><em>MAP:</em> %s</h2>\n", MapAddress);
PUTS(buf);
from LYCookies.c:
^^^^^^^^^^^^^^^^
#define PUTS(buf) (*target->isa->put_block)(target, buf, strlen(buf))
HTSprintf0(&buf, "<HEAD>\n<TITLE>%s</title>\n</HEAD>\n<BODY>\n",
COOKIE_JAR_TITLE);
PUTS(buf);
HTSprintf0(&buf, "<h1>%s (%s)%s<a href=\"%s%s\">%s</a></h1>\n",
LYNX_NAME, LYNX_VERSION,
HELP_ON_SEGMENT,
helpfilepath, COOKIE_JAR_HELP, COOKIE_JAR_TITLE);
PUTS(buf);
HTSprintf0(&buf, "<NOTE>%s\n", ACTIVATE_TO_GOBBLE);
PUTS(buf);
HTSprintf0(&buf, "%s</NOTE>\n", OR_CHANGE_ALLOW);
PUTS(buf);
HTSprintf0(&buf, "<DL COMPACT>\n");
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PUTS(buf);
- Re: lynx-dev Lynx 2.8.2pre7 + wrong link segfaults,
Leonid Pauzner <=