GNOME Bugzilla – Bug 644773
Add support for Y422 colorspaces in videoflip element
Last modified: 2011-03-15 20:28:36 UTC
Created attachment 183392 [details] [review] Patch videoflip to add Y422 support I've added support for YUY2, UYVY and YVYU colorspaces to the videoflip element. Attached is the patch, please review+commit. Thanks
Created attachment 183400 [details] [review] [PATCH] videoflip: Add support for YUY2, UVYV and YVYU colorspaces After discussion with David Schleef and additional testing, it turns out there was a buffer overflow. Since I increment x by 2, and use x+1, if the width was odd, then x+1 could try to access data outside the boundaries of the array (especially in the case of (sh - 1 - (x + 1))). I'm attaching a new patch that should resolve this issue. Thanks.
commit a3ed3d93745a0b1030fd627394c26c4f1ca1f06e Author: Youness Alaoui <youness.alaoui@collabora.co.uk> Date: Mon Mar 14 19:14:07 2011 -0400 videoflip: Add support for YUY2, UVYV and YVYU colorspaces https://bugzilla.gnome.org/show_bug.cgi?id=644773 commit 3e1c70749593ba171fe215331ba13c43e8576975 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Tue Mar 15 09:43:35 2011 +0000 tests: in videofilter unit test also check with 'odd' widths and heights And only use one test suite.
Created attachment 183463 [details] [review] [PATCH] videoflip: Fix buffer overflow bug for odd resolutions and Y422 colorspaces Damn it, I don't know why/how but it seems that git format-patch didn't recreate my amended commit that fixed the buffer overflow I discussed in comment #1 I'm attaching a new commit that fixes the buffer overflow that was missing from the commit that got merged upstream. Please merge this one too. Thanks.
Comment on attachment 183463 [details] [review] [PATCH] videoflip: Fix buffer overflow bug for odd resolutions and Y422 colorspaces commit 2a8103553d32644129b79293dbe7bd5d404d2691 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Tue Mar 15 20:19:48 2011 +0000 tests: enable more formats in videofilter unit test, check more resolutions commit a1a0186a62684520b6b49b628ed01007a7892084 Author: Youness Alaoui <youness.alaoui@collabora.co.uk> Date: Mon Mar 14 19:14:07 2011 -0400 videoflip: Fix buffer overflow bug for odd resolutions and Y422 colorspaces https://bugzilla.gnome.org/show_bug.cgi?id=644773