diff options
author | Junkyeong Kim <jk0430.kim@samsung.com> | 2016-05-12 16:30:25 +0900 |
---|---|---|
committer | Junkyeong Kim <jk0430.kim@samsung.com> | 2016-05-12 16:50:08 +0900 |
commit | db58464ed1d0bd9545a29cd7bdaa37774d59c2b0 (patch) | |
tree | 64a7db546f584dfd8cf2c47a8d2280aa76ea9978 | |
parent | f262dfedbb6840f71651dcdc3172e7eacc4e268b (diff) | |
download | libtbm-db58464ed1d0bd9545a29cd7bdaa37774d59c2b0.tar.gz libtbm-db58464ed1d0bd9545a29cd7bdaa37774d59c2b0.tar.bz2 libtbm-db58464ed1d0bd9545a29cd7bdaa37774d59c2b0.zip |
add size checking at dumpsubmit/tizen/20160512.075824accepted/tizen/wearable/20160513.004558accepted/tizen/tv/20160513.004606accepted/tizen/mobile/20160513.004645accepted/tizen/ivi/20160513.004612
Change-Id: I6535e460781c60741d47915222f17632ba95222b
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
-rwxr-xr-x | src/tbm_surface_internal.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tbm_surface_internal.c b/src/tbm_surface_internal.c index 59eac8f..4626d2f 100755 --- a/src/tbm_surface_internal.c +++ b/src/tbm_surface_internal.c @@ -1468,6 +1468,12 @@ tbm_internal_surface_dump_buffer(tbm_surface_h surface, const char *type) ret = tbm_surface_map(surface, TBM_SURF_OPTION_READ|TBM_SURF_OPTION_WRITE, &info); TBM_RETURN_IF_FAIL(ret == TBM_SURFACE_ERROR_NONE); + if (info.size > buf_info->size) { + TBM_LOG("Dump skip. surface over created buffer size(%d, %d)\n", info.size, buf_info->size); + tbm_surface_unmap(surface); + return; + } + if (info.format == TBM_FORMAT_ARGB8888 || info.format == TBM_FORMAT_XRGB8888) postfix = dump_postfix[0]; else |