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 <aparmar@codeaurora.org>
This commit is contained in:
Ajay Singh Parmar 2012-08-07 13:23:23 +05:30 committed by Stephen Boyd
parent 57fc4d4548
commit 675b4daa08

View file

@ -1452,21 +1452,21 @@ ssize_t video_3d_format_2string(uint32 format, char *buf)
len += ret; len += ret;
if (len && (format & TOP_AND_BOTTOM)) 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( single_video_3d_format_2string(
format & TOP_AND_BOTTOM)); format & TOP_AND_BOTTOM));
else else
ret = snprintf(buf + len, PAGE_SIZE, "%s", ret = snprintf(buf + len, PAGE_SIZE - len, "%s",
single_video_3d_format_2string( single_video_3d_format_2string(
format & TOP_AND_BOTTOM)); format & TOP_AND_BOTTOM));
len += ret; len += ret;
if (len && (format & SIDE_BY_SIDE_HALF)) 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( single_video_3d_format_2string(
format & SIDE_BY_SIDE_HALF)); format & SIDE_BY_SIDE_HALF));
else else
ret = snprintf(buf + len, PAGE_SIZE, "%s", ret = snprintf(buf + len, PAGE_SIZE - len, "%s",
single_video_3d_format_2string( single_video_3d_format_2string(
format & SIDE_BY_SIDE_HALF)); format & SIDE_BY_SIDE_HALF));
len += ret; len += ret;