[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev 2.8.2rel.1-fix1 - fatal error in exit_immediately_with_error_me
From: |
Klaus Weide |
Subject: |
lynx-dev 2.8.2rel.1-fix1 - fatal error in exit_immediately_with_error_message |
Date: |
Tue, 8 Jun 1999 19:27:27 -0500 (CDT) |
An error was introduced with exit_immediately_with_error_message().
Invalid memory access happens if access to startfile fails but
first_file is not true. One way to reproduce:
1. Start lynx http://existing.server/non-existing/page
Lynx shows error page from server
2. Visit various pages (but not returning to the initial
error page) until initial error page is pushed out of cache.
3. Go back in history until access to startfile is attempted again.
4. During pause for display of "Alert!: HTTP/1.0 404 Not Found"
(or similar) statusline message press 'z'.
Patch against 2.8.1rel.1 + big patch, but should work for pure
2.8.1rel.1 (line numbers different).
Klaus
--- lynx2-8-2.old/src/LYMainLoop.c Tue, 08 Jun 1999 13:19:59 -0500
+++ lynx2-8-2/src/LYMainLoop.c Tue, 08 Jun 1999 18:46:09 -0500
@@ -6437,19 +6437,20 @@
if (state == NOT_FOUND)
{
HTSprintf0(&buf, "%s\n%s %s\n",
- buf2,
+ buf2 ? 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);
+ (buf2 && strstr(buf2, gettext("Can't Access"))) ?
+ "" : startfile);
}
if (state == NULLFILE)
{
HTSprintf0(&buf, "%s\n%s\n%s\n",
- buf2,
+ buf2 ? buf2 : "",
gettext("lynx: Start file could not be found or is not
text/html or text/plain"),
gettext(" Exiting..."));
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- lynx-dev 2.8.2rel.1-fix1 - fatal error in exit_immediately_with_error_message,
Klaus Weide <=