Hi!

I'm the Debian Mantainer for Xcircuit, and I've realized that with the
latest versions xcircuits tends to SIGSEGV a lot.

One of the reasons for many of these is the lack of a "filename" in
the current page (xobj.pagelist[0] or so).

As far as I can see, the filename is nulled in events.c (241:249):

      /* initialize a new page */

      pageobj = (objectptr) malloc (sizeof(object));
      initmem(pageobj);
      sprintf(pageobj->name, "Page %d", pagenumber + 1);

      xobjs.pagelist[pagenumber]->pageinst = newpageinst(pageobj);
      xobjs.pagelist[pagenumber]->filename = NULL;
      xobjs.pagelist[pagenumber]->background.name = NULL;

And then I can't find any other place where any value is set to it.
Thus, every time some function tries to access it, finds a null value
in it.

I'm preparing a patch that checks if filename is null before doing any
operations over it.  Please tell me if my assesment of the situation
is wrong.

-- 
Besos,
Marga
_______________________________________________
Xcircuit-dev mailing list
[email protected]
http://www.opencircuitdesign.com/mailman/listinfo/xcircuit-dev

Reply via email to