lynx-dev
[Top][All Lists]
Advanced

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

lynx-dev Re: reload_read_cfg() crash on DJGPP


From: Leonid Pauzner
Subject: lynx-dev Re: reload_read_cfg() crash on DJGPP
Date: Mon, 13 Dec 1999 04:24:49 +0300 (MSK)

13-Dec-99 04:00 I wrote:
> With dev.16 I have discovered a crash on DJGPP port
> when "g lynxcfg:" and activate "RELOAD".
> gdb backtrace shows a problem in strcmp() in reload_read_cfg(),
> LYMain.c line:2216 (clean dev.16 version)

> It happen to be an EXP_PERSISTENT_COOKIES (which is default flag now
> in makefile.dos), our old friend...

> Can Doug or somebody else on DJGPP port look into that.
> (There is no problem on Linux so far).

Uh, it was with EXP_PERSISTENT_COOKIES and PERSISTENT_COOKIES:FALSE
which now default...

The following LYMain.c passage will make LYCookieFile not allocated
when persistent_cookies is FALSE:


#ifdef EXP_PERSISTENT_COOKIES
    /*
     * Sod it, this looks like a reasonable place to load the
     * cookies file, probably.  - RP
     */
    if (persistent_cookies) {
        if(LYCookieFile == NULL) {
           LYAddPathToHome(LYCookieFile = malloc(LY_MAXPATH), LY_MAXPATH, 
COOKIE_FILE);
        } else {
            if (LYCookieFile[0] == '~' && LYCookieFile[1] == '/' &&
                LYCookieFile[2] != '\0') {
                temp = NULL;
                StrAllocCopy(temp, LYCookieFile + 2);
                StrAllocCopy(LYCookieFile, wwwName(Home_Dir()));
                LYAddPathSep(&LYCookieFile);
                StrAllocCat(LYCookieFile, temp);
                FREE(temp);
            }
        }
        LYLoadCookies(LYCookieFile);
    }
#endif


Which conflicts with
---------------------

        /* set few safe flags: */
#ifdef EXP_PERSISTENT_COOKIES
        BOOLEAN persistent_cookies_flag = persistent_cookies;
        char * LYCookieFile_flag = NULL;
        StrAllocCopy(LYCookieFile_flag, LYCookieFile);
#endif

[...]

                /* Not implemented yet here,
                 * a major problem: file paths
                 * like lynx_save_space, LYCookieFile etc.
                 */
#ifdef EXP_PERSISTENT_COOKIES
        /* restore old settings */
        if (persistent_cookies != persistent_cookies_flag) {
            persistent_cookies = persistent_cookies_flag;
            HTAlert(gettext("persistent cookies state will be changed in next 
session only."));
        }
        if (strcmp(LYCookieFile, LYCookieFile_flag)) {
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            StrAllocCopy(LYCookieFile, LYCookieFile_flag);
            CTRACE((tfp, "cookies file can be changed in next session only, 
restored.\n"));
        }
        FREE(LYCookieFile_flag);
#endif


Perhaps all "reset old settings" thing should be conditional
with if (persistent_cookies_flag) ...




reply via email to

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