Index: xc/ChangeLog =================================================================== RCS file: /cvs/xorg/xc/ChangeLog,v retrieving revision 1.862 diff -u -2 -0 -r1.862 ChangeLog --- xc/ChangeLog 4 Apr 2005 23:07:07 -0000 1.862 +++ xc/ChangeLog 9 Apr 2005 06:31:57 -0000 @@ -1,20 +1,27 @@ +2005-04-09 Roland Mainz + * xc/programs/xman/buttons.c + bugzilla #2942 (https://bugs.freedesktop.org/show_bug.cgi?id=2942) + attachment #xxx (https://bugs.freedesktop.org/attachment.cgi?id=xxx) + Fix possible crash due uninitalised structure when "xman" opens the + print dialog. + 2005-04-05 Daniel Stone * programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c: Release SDA/SDL I2C lines from an asserted-low state after a DDC probe, which caused Apple Studio Display monitors to shut off after a second or so (Ben Herrenschmidt). 2005-04-04 Egbert Eich * programs/Xserver/hw/xfree86/drivers/savage/savage_accel.c: (SavageInitAccel): Add ROP_NEEDS_SOURCE to Mono8x8PatternFill as S3 chips tend to lock up without it (Helmut Fahrion). 2005-04-04 Egbert Eich * programs/Xserver/hw/xfree86/xf86cfg/accessx.c: (CreateAccessXHelpDialog), (AccessXInitialize): * programs/Xserver/hw/xfree86/xf86cfg/card-cfg.c: (CardModelCallback), (CardModel): Index: xc/programs/xman/buttons.c =================================================================== RCS file: /cvs/xorg/xc/programs/xman/buttons.c,v retrieving revision 1.5 diff -u -2 -0 -r1.5 buttons.c --- xc/programs/xman/buttons.c 2 Sep 2004 08:40:33 -0000 1.5 +++ xc/programs/xman/buttons.c 9 Apr 2005 06:32:51 -0000 @@ -161,42 +161,43 @@ StartManpage( man_globals, FALSE, TRUE); } return(man_globals->This_Manpage); } /* Function Name: InitPsuedoGlobals * Description: Initializes the psuedo global variables. * Arguments: none. * Returns: a pointer to a new pseudo globals structure. */ ManpageGlobals * InitPsuedoGlobals(void) { ManpageGlobals * man_globals; /* * Allocate necessary memory. */ - man_globals = (ManpageGlobals *) - XtMalloc( (Cardinal) sizeof(ManpageGlobals)); + man_globals = (ManpageGlobals *)XtCalloc(ONE, (Cardinal) sizeof(ManpageGlobals)); + if(!man_globals) + return NULL; man_globals->search_widget = NULL; man_globals->section_name = (char **) XtMalloc( (Cardinal) (sections * sizeof(char *))); man_globals->manpagewidgets.box = (Widget *) XtCalloc( (Cardinal) sections, (Cardinal) sizeof(Widget)); /* Initialize the number of screens that will be shown */ man_globals->both_shown = resources.both_shown_initial; return(man_globals); } /* Function Name: CreateManpageWidget * Description: Creates a new manual page widget. * Arguments: man_globals - a new man_globals structure. * name - name of this shell widget instance. * full_instance - if true then create a full manpage, * otherwise create stripped down version