Fix a bug in region_union_rect()
authorDavid FORT <contact@hardening-consulting.com>
Wed, 30 Sep 2015 19:14:43 +0000 (21:14 +0200)
committerDavid FORT <contact@hardening-consulting.com>
Wed, 30 Sep 2015 19:14:43 +0000 (21:14 +0200)
commitff92a12ceb05af804fcef0b74b1b682bbc1c0d9b
tree2a7dda666c5cc2b9ff0decc2d16661927869ce6f
parent1e1983b7daf88375684854a977549d64f791173f
Fix a bug in region_union_rect()

When region_union_rect() was called with a rect that was above the region without
intersecting it, the first band was created too large. This patch fixes this and
add a unitary test.

All credits go to @nfedera that:
* found the bug;
* find a dataset to reproduce;
* code the unitary test;
* spotted a suspicious line that was the faulty one.
libfreerdp/codec/region.c
libfreerdp/codec/test/TestFreeRDPRegion.c