mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
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:
parent
57fc4d4548
commit
675b4daa08
1 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue