[Tizen] Fix SVACE issue 34/253534/2 accepted/tizen_6.5_unified accepted/tizen_7.0_unified accepted/tizen_7.0_unified_hotfix accepted/tizen_unified tizen tizen_6.5 tizen_7.0 tizen_7.0_hotfix accepted/tizen/6.5/unified/20211028.114057 accepted/tizen/7.0/unified/20221110.061319 accepted/tizen/7.0/unified/hotfix/20221116.105931 accepted/tizen/unified/20210216.125200 submit/tizen/20210216.043216 submit/tizen_6.5/20211028.163101 tizen_6.5.m2_release tizen_7.0_m2_release
authorHeeyong Song <heeyong.song@samsung.com>
Thu, 4 Feb 2021 05:43:05 +0000 (14:43 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Mon, 15 Feb 2021 05:11:20 +0000 (14:11 +0900)
Change-Id: If8c8f2c61248125dca481e308148bd5cc584bb6d

dali/internal/imaging/common/loader-png.cpp

index 4b51af3..55a3149 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -308,6 +308,12 @@ bool LoadBitmapFromPng( const Dali::ImageLoader::Input& input, Dali::Devel::Pixe
 
   DALI_ASSERT_DEBUG(pixels);
   rows = reinterpret_cast< png_bytep* >( malloc(sizeof(png_bytep) * height) );
+  if(!rows)
+  {
+    DALI_LOG_ERROR("malloc is failed\n");
+    return false;
+  }
+
   for(y=0; y<height; y++)
   {
     rows[y] = pixels + y * stride;