configure.ac | 4 ++-- hw/xfree86/modes/xf86Crtc.c | 21 ++++++++------------- hw/xfree86/vbe/vbe.c | 2 +- 3 files changed, 11 insertions(+), 16 deletions(-)
New commits: commit b9c7485c68d0faf5c9f1f46fc7f39164b0e82a7a Author: Jeremy Huddleston <[email protected]> Date: Thu Mar 17 13:54:05 2011 -0700 configure.ac: Bump version to 1.9.5 Signed-off-by: Jeremy Huddleston <[email protected]> diff --git a/configure.ac b/configure.ac index 76bf2c3..bf4e7f4 100644 --- a/configure.ac +++ b/configure.ac @@ -26,8 +26,8 @@ dnl dnl Process this file with autoconf to create configure. AC_PREREQ(2.57) -AC_INIT([xorg-server], 1.9.4.901, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) -RELEASE_DATE="2011-03-04" +AC_INIT([xorg-server], 1.9.5, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) +RELEASE_DATE="2011-03-17" AC_CONFIG_SRCDIR([Makefile.am]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE commit db9321b33047dadc791246c9830abcbd05ef76d1 Author: Erkki Seppälä <[email protected]> Date: Thu Mar 10 11:40:40 2011 +0200 xfree86/modes: Fixed memory leak in xf86InitialConfiguration There were two memory leaks in the function: one was the lack of free for "enabled", the other was the full lack of releasing anything when configuration was too small. The first issue was fixed by adding the missing free, the other was addressed by replacing the duplicate memory releasing sequences with one that is gotoed into. Reviewed-by: Peter Hutterer <[email protected]> Reviewed-by: Rami Ylimäki <[email protected]> Signed-off-by: Erkki Seppälä <[email protected]> Signed-off-by: Keith Packard <[email protected]> (cherry picked from commit d3adf2d9350bee4125107e2ea1ed0c51bb736562) diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index 30742ff..4db4d22 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -2355,6 +2355,7 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow) int i = scrn->scrnIndex; Bool have_outputs = TRUE; Bool ret; + Bool success = FALSE; /* Set up the device options */ config->options = xnfalloc (sizeof (xf86DeviceOptions)); @@ -2413,11 +2414,7 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow) * Set the position of each output */ if (!xf86InitialOutputPositions (scrn, modes)) - { - free(crtcs); - free(modes); - return FALSE; - } + goto bailout; /* * Set initial panning of each output @@ -2428,11 +2425,7 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow) * Assign CRTCs to fit output configuration */ if (have_outputs && !xf86PickCrtcs (scrn, crtcs, modes, 0, width, height)) - { - free(crtcs); - free(modes); - return FALSE; - } + goto bailout; /* XXX override xf86 common frame computation code */ @@ -2509,7 +2502,7 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow) * Make sure the configuration isn't too small. */ if (width < config->minWidth || height < config->minHeight) - return FALSE; + goto bailout; /* * Limit the crtc config to virtual[XY] if the driver can't grow the @@ -2532,10 +2525,12 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow) xf86CVTMode(width, height, 60, 0, 0)); } - + success = TRUE; + bailout: free(crtcs); free(modes); - return TRUE; + free(enabled); + return success; } /* commit 8ffaef2ebd2611e2eed4ef97350c3a34508f5252 Author: Adam Jackson <[email protected]> Date: Thu Feb 24 16:06:34 2011 -0500 vbe: Fix malloc size bug v2: Slightly more obvious sizing math. ==14882== Invalid write of size 2 ==14882== at 0x6750267: VBEGetVBEInfo (vbe.c:400) ==14882== by 0x6142064: ??? (in /usr/lib64/xorg/modules/drivers/vesa_drv.so) ==14882== by 0x471895: InitOutput (xf86Init.c:519) ==14882== by 0x422778: main (main.c:205) ==14882== Address 0x4f32fa8 is 72 bytes inside a block of size 73 alloc'd ==14882== at 0x4A0640D: malloc (vg_replace_malloc.c:236) ==14882== by 0x675024B: VBEGetVBEInfo (vbe.c:398) ==14882== by 0x6142064: ??? (in /usr/lib64/xorg/modules/drivers/vesa_drv.so) ==14882== by 0x471895: InitOutput (xf86Init.c:519) ==14882== by 0x422778: main (main.c:205) Reviewed-by: Mark Kettenis <[email protected]> Reviewed-by: Alan Coopersmith <[email protected]> Signed-off-by: Adam Jackson <[email protected]> (cherry picked from commit d8caa782009abf4dc17b945e325e83fda299a534) diff --git a/hw/xfree86/vbe/vbe.c b/hw/xfree86/vbe/vbe.c index 7a64a4a..1d3775b 100644 --- a/hw/xfree86/vbe/vbe.c +++ b/hw/xfree86/vbe/vbe.c @@ -395,7 +395,7 @@ VBEGetVBEInfo(vbeInfoPtr pVbe) i = 0; while (modes[i] != 0xffff) i++; - block->VideoModePtr = malloc(sizeof(CARD16) * i + 1); + block->VideoModePtr = malloc(sizeof(CARD16) * (i + 1)); memcpy(block->VideoModePtr, modes, sizeof(CARD16) * i); block->VideoModePtr[i] = 0xffff; -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

