[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev A Fatal error has occurred in Lynx Ver. 2.8.2rel.1
From: |
Leonid Pauzner |
Subject: |
Re: lynx-dev A Fatal error has occurred in Lynx Ver. 2.8.2rel.1 |
Date: |
Sat, 9 Oct 1999 14:10:09 +0400 (MSD) |
9-Oct-99 02:24 Klaus Weide wrote:
>> LYNX LYMAINLOOP exit_immediately_with_error_message
>> 33967 00000000000105C8
>> 00000000000FF6A8
>> A Fatal error has occurred in Lynx Ver. 2.8.2rel.1
> Function exit_immediately_with_error_message had problems that
> have since been fixed in 2.8.3dev code the relevand difference
> is probably
> OLD:
> HTSprintf0(&buf, "%s\n%s %s\n",
> buf2,
> gettext("lynx: Can't access startfile"),
> /*
> * hack: if we fail in HTAccess.c
> * avoid duplicating URL, oh.
> */
> strstr(buf2, gettext("Can't Access")) ? "" : startfile);
> NEW:
> HTSprintf0(&buf, "%s\n%s %s\n",
> buf2 ? buf2 : "",
> gettext("lynx: Can't access startfile"),
> /*
> * hack: if we fail in HTAccess.c
> * avoid duplicating URL, oh.
> */
> (buf2 && strstr(buf2, gettext("Can't Access"))) ?
> "" :
> startfile);
> and similarly in the block below that.
> -----
> The new 2.8.3dev code still has a problem though: near the end,
Yes/no. (This will not happen since "state" assumed to have only two states.
And the above fix could probably be easier fixed with setting buf2 to "\0"
after if (first_file) when buf2 got no message - not a large overhead before
exit() anyway. Sorry for bad design, that was a 'last minute changes').
> fprintf(stderr, buf);
> ....
> printf(buf);
> should be
> fprintf(stderr, "%s", buf);
> ....
> printf("%s", buf);
> instead. The string in buf may contain '%' characters, which will easily
> cause a crash as it is now.
> Klaus