From 6db0f4732610b33ffb503b20619585d235af31da Mon Sep 17 00:00:00 2001 From: Neti Ravi Kumar Date: Fri, 23 Dec 2011 19:43:05 +0530 Subject: [PATCH] Display/libqcomUI:Check for the clip width limit clip width should not exceed with the render buffer width(fb0) Change-Id: Ia927dc1e709a259910ae8f9e7d37979306eb3437 --- libqcomui/qcom_ui.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libqcomui/qcom_ui.cpp b/libqcomui/qcom_ui.cpp index f1cd7aa..107827f 100644 --- a/libqcomui/qcom_ui.cpp +++ b/libqcomui/qcom_ui.cpp @@ -399,6 +399,10 @@ int qcomuiClearRegion(Region region, EGLDisplay dpy, EGLSurface sur) (r.left + r.top*renderBuffer->stride)*bytesPerPixel; int w = r.width()*bytesPerPixel; int h = r.height(); + if(((int)dst + w ) > (fbHandle->base + renderBuffer->stride*bytesPerPixel)){ + LOGE("%s: Excedding the framebuffer limit",__FUNCTION__ ) ; + return -1; + } do { android_memset32((uint32_t*)dst, 0, w); dst += stride;