From 675b4daa08c7aaa6b0cef619c2d8f9d9e6f9d897 Mon Sep 17 00:00:00 2001 From: Ajay Singh Parmar Date: Tue, 7 Aug 2012 13:23:23 +0530 Subject: [PATCH] msm_fb: hdmi: Give proper buffer size Need to give proper buffer size for snprintf function calls. CRs-Fixed: 378343 Change-Id: Ia4df74c9871b26255572bb3ba226317c3076b5b6 Signed-off-by: Ajay Singh Parmar --- drivers/video/msm/external_common.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/video/msm/external_common.c b/drivers/video/msm/external_common.c index 46ef7b432212..0976fc676e9a 100644 --- a/drivers/video/msm/external_common.c +++ b/drivers/video/msm/external_common.c @@ -1452,21 +1452,21 @@ ssize_t video_3d_format_2string(uint32 format, char *buf) len += ret; if (len && (format & TOP_AND_BOTTOM)) - ret = snprintf(buf + len, PAGE_SIZE, ":%s", + ret = snprintf(buf + len, PAGE_SIZE - len, ":%s", single_video_3d_format_2string( format & TOP_AND_BOTTOM)); else - ret = snprintf(buf + len, PAGE_SIZE, "%s", + ret = snprintf(buf + len, PAGE_SIZE - len, "%s", single_video_3d_format_2string( format & TOP_AND_BOTTOM)); len += ret; if (len && (format & SIDE_BY_SIDE_HALF)) - ret = snprintf(buf + len, PAGE_SIZE, ":%s", + ret = snprintf(buf + len, PAGE_SIZE - len, ":%s", single_video_3d_format_2string( format & SIDE_BY_SIDE_HALF)); else - ret = snprintf(buf + len, PAGE_SIZE, "%s", + ret = snprintf(buf + len, PAGE_SIZE - len, "%s", single_video_3d_format_2string( format & SIDE_BY_SIDE_HALF)); len += ret;