lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev bug report


From: T.E.Dickey
Subject: Re: lynx-dev bug report
Date: Thu, 22 Jul 1999 20:20:47 -0400 (EDT)

> 
> In the lynx source that comes with redhat 5.2 and 6.0, in the file 
> lynx2-8-1/src/chrtrans/makeuctb.c, line 654 is: 

I believe we fixed this after 2.8.1 (will verify of course)

The current version of lynx is 2.8.2 (2.8.3 in development)
It's available at
        http://lynx.browser.org
        http://sol.slcc.edu/lynx/release
        ftp://lynx.isc.org/lynx-2.8.2
  
>           id_append[i+1] = '\0'; 
>  
> in the context: 
>  
>     if (this_isDefaultMap == 1) { 
>       *id_append = '\0'; 
>     } else { 
>       for (i = 0, p = this_MIMEcharset; 
>            *p && (i < UC_MAXLEN_ID_APPEND-1); 
>            p++, i++) { 
>           id_append[i+1] = isalnum(*p) ? *p : '_'; 
>       } 
>     } 
>     id_append[i+1] = '\0'; 
>     fprintf(stderr, " (%s).\n", id_append); 
>  
> which means that if this_isDefaultMap == 1, then "i" is not initialized.  In 
> my case, "i == 256", way beyond the bounds of the array. 
>  
> The new stackguard compiler permutes memory enough to cause this to cause 
> printf to segfault while dynamically loading during first invocation. 
>  
> I patched this by moving the errant assignment up into the else clause of the 
> if: 
>  
> -------------------------------------------------------------------------------
>  
> *** src/chrtrans/makeuctb.c~    Sat Sep 26 20:28:34 1998 
> --- src/chrtrans/makeuctb.c     Thu Jul 22 17:05:40 1999 
> *************** 
> *** 651,656 **** 
>             id_append[i+1] = isalnum(*p) ? *p : '_'; 
>         } 
>       } 
> -     id_append[i+1] = '\0'; 
>       fprintf(stderr, " (%s).\n", id_append); 
>    
> --- 651,656 ---- 
>             id_append[i+1] = isalnum(*p) ? *p : '_'; 
>         } 
> +       id_append[i+1] = '\0'; 
>       } 
>       fprintf(stderr, " (%s).\n", id_append); 
>    
> -------------------------------------------------------------------------------
>  
>  
> -- Perry Wagle (address@hidden) 


-- 
Thomas E. Dickey
address@hidden
http://www.clark.net/pub/dickey

reply via email to

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