[vlc-commits] chroma: copy: fix heap-buffer-overflow from SSE_SplitUV

Thomas Guillem git at videolan.org
Fri Nov 17 10:23:24 CET 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Nov 16 16:18:34 2017 +0100| [c6f989c9d3eac9ddb5cf008f71dbc9c77e25b580] | committer: Thomas Guillem

chroma: copy: fix heap-buffer-overflow from SSE_SplitUV

Avoid splitting too far. This generally don't cause any crashes since src and
dst are aligned.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c6f989c9d3eac9ddb5cf008f71dbc9c77e25b580
---

 modules/video_chroma/copy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/video_chroma/copy.c b/modules/video_chroma/copy.c
index 6c601b17c1..d2ce2bc517 100644
--- a/modules/video_chroma/copy.c
+++ b/modules/video_chroma/copy.c
@@ -450,7 +450,7 @@ static void SSE_SplitPlanes(uint8_t *dstu, size_t dstu_pitch,
 
         /* Copy from our cache to the destination */
         SSE_SplitUV(dstu, dstu_pitch, dstv, dstv_pitch,
-                    cache, w16, src_pitch, hblock, cpu);
+                    cache, w16, src_pitch / 2, hblock, cpu);
 
         /* */
         src  += src_pitch  * hblock;



More information about the vlc-commits mailing list