提交 49a3b85c 编写于 作者: O openeuler-ci-bot 提交者: Gitee

!662 fix segment fault when list images

Merge pull request !662 from wangfengtu/segfault
......@@ -3310,7 +3310,8 @@ static int image_list_shrink_to_fit(imagetool_images_list *images_list)
}
// memory shrink to fit
ret = mem_realloc((void **)(&tmp), images_list->images_len, images_list->images, g_image_store->images_list_len);
ret = mem_realloc((void **)(&tmp), images_list->images_len * sizeof(imagetool_image *),
images_list->images, g_image_store->images_list_len * sizeof(imagetool_image *));
if (ret != 0) {
ERROR("Failed to realloc memory for memory shrink to fit");
return -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册