lynx-dev
[Top][All Lists]
Advanced

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

lynx-dev Another proposed patch


From: Larry W. Virden
Subject: lynx-dev Another proposed patch
Date: Sun, 22 Nov 1998 06:02:12 -0500 (EST)

This one is more serious - it is an attempt to fix a crash.  However, I
am uncertain of the ramifications of the particular strings I have chosen.
The problem is that in certain cases, the address was null, so the fprintf
was crashing.

--- lynx2-8-2/src/LYShowInfo.c-dist     Sun Nov 22 05:55:18 1998
+++ lynx2-8-2/src/LYShowInfo.c  Sun Nov 22 05:58:47 1998
@@ -26,7 +26,7 @@
 #if defined(HAVE_CONFIG_H) && !defined(NO_CONFIG_INFO)
 #define HAVE_CFG_DEFS_H
 
-#define PutDefs(table, N) fprintf(fp0, "%-35s %s\n", table[N].name, 
table[N].value)
+#define PutDefs(table, N) { int val=N; fprintf(fp0, "%-35s %s\n", 
(table[val].name ? table[val].name :"Not Found") , (table[val].value ? 
table[val].value : "None Available")); }
 
 /*
  *  Compile-time definitions info, returns local url
-- 
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]