core dump at startup

From: Stefan Monnier (monnier@cs.yale.edu)
Date: Wed Oct 29 1997 - 00:09:52 CET


It seems that under some circumstances. the lines

        _XA_WM_CTWMSLIST = XInternAtom (dpy, "WM_CTWMSLIST", True);
            if (_XA_WM_CTWMSLIST == None) return ((char**)0);

might make GetCaptivesList return a NULL pointer, which is not checked
in AddToCaptiveList.

workmgr.c:AddToCaptiveList, change

    cl = clist;
    count = 0;
    while (*cl) {
        count++;
        if (!captivename) {

into

    cl = clist;
    count = 0;
    while (cl && *cl) {
        count++;
        if (!captivename) {

Similarly, workmgr.c:freeCaptiveList has to be changed from

        static void freeCaptiveList (clist)
        char **clist;
        {
            while (*clist) { free (*clist++); }
        }

to

        static void freeCaptiveList (clist)
        char **clist;
        {
            while (clist && *clist) { free (*clist++); }
        }

-- Stefan



This archive was generated by hypermail 2.1.2 : Sat Jun 22 2002 - 06:45:05 CEST