Fix ASAN issue: heap-buffer-overflow 46/187246/1
authorHeeyong Song <heeyong.song@samsung.com>
Tue, 21 Aug 2018 07:28:01 +0000 (16:28 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Tue, 21 Aug 2018 07:28:13 +0000 (16:28 +0900)
Change-Id: Ife43164c83133c89d05c97b7ba709b1249385bd1

dali/internal/imaging/common/loader-jpeg-turbo.cpp

index 4efc020..7d78d71 100644 (file)
@@ -224,7 +224,7 @@ void AddExifFieldPropertyMap( Dali::Property::Map& out, const ExifEntry& entry,
   {
     case EXIF_FORMAT_ASCII:
     {
-      out.Insert( shortName, std::string(reinterpret_cast<char *>(entry.data)) );
+      out.Insert( shortName, std::string( reinterpret_cast<char *>(entry.data), entry.size ) );
       break;
     }
     case EXIF_FORMAT_SHORT: