if (size == TEMP_DATA_SIZE)
_image->data = (unsigned char *)data;
else
- _image->data = g_memdup(data, size);
+ _image->data = g_memdup2(data, size);
_image->size = size;
_image->width = width;
if (_src->size == TEMP_DATA_SIZE)
_dst->data = _src->data;
else
- _dst->data = g_memdup(_src->data, _dst->size);
+ _dst->data = g_memdup2(_src->data, _dst->size);
*dst = (mm_util_image_h)_dst;
*color = _image->color;
if (data && size) {
- *data = g_memdup(_image->data, _image->size);
+ *data = g_memdup2(_image->data, _image->size);
*size = _image->size;
}
for (idx = 1; idx < (int)(gif_image->SHeight); idx++) {
/* Allocate the other rows, and set their color to background too: */
- _screen_buf[idx] = g_memdup(_screen_buf[0], row_size);
+ _screen_buf[idx] = g_memdup2(_screen_buf[0], row_size);
}
*screen_buf = _screen_buf;
mm_util_retvm_if(!handle->io_buf.buf || handle->io_buf.buf_size == 0, MM_UTIL_ERROR_INVALID_PARAMETER, "Invalid io_buf");
mm_util_retvm_if(!buffer || !buffer_size, MM_UTIL_ERROR_INVALID_PARAMETER, "Invalid buffer");
- *buffer = g_memdup(handle->io_buf.buf, handle->io_buf.buf_size);;
+ *buffer = g_memdup2(handle->io_buf.buf, handle->io_buf.buf_size);
*buffer_size = handle->io_buf.buf_size;
return MM_UTIL_ERROR_NONE;
Name: libmm-utility
Summary: Multimedia Framework Utility Library
-Version: 0.3.1
+Version: 0.3.2
Release: 0
Group: System/Libraries
License: Apache-2.0
ret = __mm_util_webp_anim_enc_save(anim_enc, &webp_data);
if (ret == MM_UTIL_ERROR_NONE) {
- *buf = g_memdup(webp_data.bytes, webp_data.size);
+ *buf = g_memdup2(webp_data.bytes, webp_data.size);
*buf_size = webp_data.size;
} else {
mm_util_error("Error! __mm_util_webp_anim_enc_save(%d)", ret);