diff options
author | Jiyong Min <jiyong.min@samsung.com> | 2017-04-27 08:30:55 +0900 |
---|---|---|
committer | Jiyong Min <jiyong.min@samsung.com> | 2017-04-27 08:46:26 +0900 |
commit | be939d6b5cf6fe0248ad4226e22744d11e3f786e (patch) | |
tree | bfc09cbfa4912804093bb2751109749e353022e5 | |
parent | 7f8e3db4b6fcea6256c42cc292f11940209db132 (diff) | |
download | libmm-imgp-gstcs-be939d6b5cf6fe0248ad4226e22744d11e3f786e.tar.gz libmm-imgp-gstcs-be939d6b5cf6fe0248ad4226e22744d11e3f786e.tar.bz2 libmm-imgp-gstcs-be939d6b5cf6fe0248ad4226e22744d11e3f786e.zip |
Change the length of format for strlcpytizen_4.0.m1_releasesubmit/tizen/20170427.004342accepted/tizen/unified/20170428.032504
[Problem] Copying 'RGBA8888' string make crash.
(This issue happen after svace issue was fixed)
[Solution] Change the length of string to copy
Change-Id: I741012cd0763b9c61bbc15fbc9bd307cbfd9d01c
Signed-off-by: jiyong min <jiyong.min@samsung.com>
-rwxr-xr-x | gstcs/mm_util_gstcs.c | 12 | ||||
-rwxr-xr-x | packaging/libmm-imgp-gstcs.spec | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/gstcs/mm_util_gstcs.c b/gstcs/mm_util_gstcs.c index 41ccb59..90d8f78 100755 --- a/gstcs/mm_util_gstcs.c +++ b/gstcs/mm_util_gstcs.c @@ -391,13 +391,13 @@ _mm_set_image_colorspace(image_format_s* __format) memset(__format->colorspace, 0, IMAGE_FORMAT_LABEL_BUFFER_SIZE); if ((strcmp(__format->format_label, "I420") == 0) || (strcmp(__format->format_label, "Y42B") == 0) || (strcmp(__format->format_label, "Y444") == 0) || (strcmp(__format->format_label, "YV12") == 0) || (strcmp(__format->format_label, "NV12") == 0) || (strcmp(__format->format_label, "UYVY") == 0) || (strcmp(__format->format_label, "YUYV") == 0)) { - SAFE_STRCPY(__format->colorspace, "YUV", IMAGE_FORMAT_LABEL_BUFFER_SIZE-1); + SAFE_STRCPY(__format->colorspace, "YUV", IMAGE_FORMAT_LABEL_BUFFER_SIZE); } else if ((strcmp(__format->format_label, "RGB888") == 0) || (strcmp(__format->format_label, "BGR888") == 0) || (strcmp(__format->format_label, "RGB565") == 0)) { - SAFE_STRCPY(__format->colorspace, "RGB", IMAGE_FORMAT_LABEL_BUFFER_SIZE-1); + SAFE_STRCPY(__format->colorspace, "RGB", IMAGE_FORMAT_LABEL_BUFFER_SIZE); } else if ((strcmp(__format->format_label, "ARGB8888") == 0) || (strcmp(__format->format_label, "BGRA8888") == 0) || (strcmp(__format->format_label, "RGBA8888") == 0) || (strcmp(__format->format_label, "ABGR8888") == 0)) { - SAFE_STRCPY(__format->colorspace, "RGBA", IMAGE_FORMAT_LABEL_BUFFER_SIZE-1); + SAFE_STRCPY(__format->colorspace, "RGBA", IMAGE_FORMAT_LABEL_BUFFER_SIZE); } else if ((strcmp(__format->format_label, "BGRX") == 0)) { - SAFE_STRCPY(__format->colorspace, "BGRX", IMAGE_FORMAT_LABEL_BUFFER_SIZE-1); + SAFE_STRCPY(__format->colorspace, "BGRX", IMAGE_FORMAT_LABEL_BUFFER_SIZE); } else { gstcs_error("Check your colorspace format label"); GSTCS_FREE(__format->colorspace); @@ -470,7 +470,7 @@ _mm_set_input_image_format_s_struct(imgp_info_s* pImgp_info) /* char* __format_l return NULL; } memset(__format->format_label, 0, IMAGE_FORMAT_LABEL_BUFFER_SIZE); - SAFE_STRCPY(__format->format_label, pImgp_info->input_format_label, IMAGE_FORMAT_LABEL_BUFFER_SIZE-1); + SAFE_STRCPY(__format->format_label, pImgp_info->input_format_label, IMAGE_FORMAT_LABEL_BUFFER_SIZE); gstcs_debug("input_format_label: %s\n", pImgp_info->input_format_label); _mm_set_image_colorspace(__format); @@ -525,7 +525,7 @@ _mm_set_output_image_format_s_struct(imgp_info_s* pImgp_info, const image_format return NULL; } memset(__format->format_label, 0, IMAGE_FORMAT_LABEL_BUFFER_SIZE); - SAFE_STRCPY(__format->format_label, pImgp_info->output_format_label, IMAGE_FORMAT_LABEL_BUFFER_SIZE-1); + SAFE_STRCPY(__format->format_label, pImgp_info->output_format_label, IMAGE_FORMAT_LABEL_BUFFER_SIZE); _mm_set_image_colorspace(__format); __format->width = pImgp_info->dst_width; diff --git a/packaging/libmm-imgp-gstcs.spec b/packaging/libmm-imgp-gstcs.spec index 5dadba5..cd642d0 100755 --- a/packaging/libmm-imgp-gstcs.spec +++ b/packaging/libmm-imgp-gstcs.spec @@ -1,7 +1,7 @@ #sbs-git:slp/pkgs/l/libmm-imgp-gstcs libmm-imgp-gstcs 0.1 62b62e6d483557fc5750d1b4986e9a98323f1194 Name: libmm-imgp-gstcs Summary: Multimedia Framework Utility Library -Version: 0.13 +Version: 0.14 Release: 16 Group: System/Libraries License: Apache-2.0 |