!10437 Modify waring information

From: @shenwei41
Reviewed-by: @liucunwei,@heleiwang
Signed-off-by: @liucunwei
pull/10437/MERGE
mindspore-ci-bot 4 years ago committed by Gitee
commit b1160e68f0

@ -306,9 +306,9 @@ static bool ConvertYUV420SPToBGR(const uint8_t *data, LDataType data_type, bool
const uint8_t *y_ptr = data;
const uint8_t *uv_ptr = y_ptr + w * h;
uint8_t *bgr_ptr = mat;
int bgr_stride = 3 * w;
const int bgr_stride = 3 * w;
for (int y = 0; y < h; ++y) {
for (uint64_t y = 0; y < h; ++y) {
uint8_t *bgr_buf = bgr_ptr;
const uint8_t *uv_buf = uv_ptr;
const uint8_t *y_buf = y_ptr;

@ -15,7 +15,7 @@
*/
#include "minddata/dataset/kernels/image/lite_cv/lite_mat.h"
#include <limits.h>
#include <limits>
#include <algorithm>
#include <cmath>
#ifdef ENABLE_ANDROID
@ -252,7 +252,7 @@ void LiteMat::Release() {
void *LiteMat::AlignMalloc(unsigned int size) {
unsigned int length = sizeof(void *) + ALIGN - 1;
if (size > INT_MAX - length) {
if (size > std::numeric_limits<uint32_t>::max() - length) {
return nullptr;
}
void *p_raw = reinterpret_cast<void *>(malloc(size + length));

Loading…
Cancel
Save