From 2505b95e91f7c076e617c253c0642711a9ef927b Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Wed, 22 Dec 2021 16:40:27 +0900 Subject: [PATCH] sw_engine texmap: ++safety Prevent range over just in case. Change-Id: I27ed449d1292bc8e191d0a6fb751ab27ea3ee125 --- src/lib/sw_engine/tvgSwRasterTexmapInternal.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/sw_engine/tvgSwRasterTexmapInternal.h b/src/lib/sw_engine/tvgSwRasterTexmapInternal.h index 0c6bf13..4e8d342 100644 --- a/src/lib/sw_engine/tvgSwRasterTexmapInternal.h +++ b/src/lib/sw_engine/tvgSwRasterTexmapInternal.h @@ -142,6 +142,8 @@ //Step UV horizontally u += _dudx; v += _dvdx; + //range over? + if ((uint32_t)v >= image->h) break; } next: //Step along both edges -- 2.7.4