[Xcircuit-dev] Several Segmentation Faults
Margarita Manterola
margamanterola at gmail.com
Sun Jan 6 05:02:48 PST 2008
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
More information about the Xcircuit-dev
mailing list