gdi32/dibdrv: don't add_join if points are coincident in wide_line_segments

Alexandre Julliard julliard at winehq.org
Wed Apr 11 12:39:37 CDT 2012


Daniel Lehman <dlehman at esri.com> writes:

> This fixes a crash in PolyPolyline if points are in the same spot
>
> There were timeouts in the Testbot but were unrelated to anything I changed
>
> From 23edf2c2b89b98ef18849806e74b5d77f7889160 Mon Sep 17 00:00:00 2001
> From: Daniel Lehman <dlehman at esri.com>
> Date: Wed, 25 Jan 2012 13:47:31 -0800
> Subject: gdi32/dibdrv: don't add_join if points are coincident in wide_line_segments
>
> if 2 points coincide (dx == dy == 0), wide_line_segments returns immediately
> in that case, face_1 is not changed.  it is not initialized so junk values on the
> stack are used.  when passed to add_join they create a region that causes a huge
> amount of memory to be allocated.  depending on the values, all available/rlimit
> memory is exhausted and the program crashes.  reverting to 1.3.26 works fine
>
> the test case submitted is a drastically reduced, simplest possible form of what our
> internal test does, based on real map data

You should integrate the test with the other graphics tests, to reuse
all the infrastructure and also verify the graphics results. Also there
is probably the same problem with the first and last points.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list