Applied secure log for privacy protect
authorJungYumin <y_m.jung@samsung.com>
Thu, 18 Apr 2013 08:32:46 +0000 (17:32 +0900)
committerJungYumin <y_m.jung@samsung.com>
Thu, 18 Apr 2013 08:32:46 +0000 (17:32 +0900)
Change-Id: Ia751f634fb045048d0cc8911c06b5843c9314e9b
Signed-off-by: JungYumin <y_m.jung@samsung.com>
src/FMedia_ExifUtil.cpp
src/FMedia_ImageDecoder.cpp
src/FMedia_ImageUtil.cpp
src/FMedia_MediaUtil.cpp

index 87beff9..de56356 100644 (file)
@@ -242,7 +242,7 @@ result _ExifUtil::GetValue(const Tizen::Base::String& key, int &value)
        }
        else
        {
-               SysLogException(NID_MEDIA, E_INVALID_ARG, "[E_INVALID_ARG] Key:%S was wrong.", key.GetPointer());
+               SysLogException(NID_MEDIA, E_INVALID_ARG, "[E_INVALID_ARG] Key:%ls was wrong.", key.GetPointer());
                return E_INVALID_ARG;
        }
 
@@ -266,7 +266,7 @@ result _ExifUtil::GetValue(const Tizen::Base::String& key, double &value)
                value = __gpsLatitude;
        } else
        {
-               SysLogException(NID_MEDIA, E_INVALID_ARG, "[E_INVALID_ARG] Key:%S was wrong.", key.GetPointer());
+               SysLogException(NID_MEDIA, E_INVALID_ARG, "[E_INVALID_ARG] Key:%ls was wrong.", key.GetPointer());
                return E_INVALID_ARG;
        }
 
index fd976e4..f2118cb 100644 (file)
@@ -79,7 +79,7 @@ _ImageDecoder::DecodeToBufferN(const Tizen::Base::String& filePath,
 
        SysTryReturn(NID_MEDIA, filePath.GetLength() > 0 && filePath.GetLength() <= PATH_MAX, null, E_INVALID_ARG,
                                "[E_INVALID_ARG] Given filePath length is zero or exceeds system limitations Length = %d.",filePath.GetLength());
-       SysTryReturn(NID_MEDIA, File::IsFileExist(filePath), null, E_FILE_NOT_FOUND,
+       SysSecureTryReturn(NID_MEDIA, File::IsFileExist(filePath), null, E_FILE_NOT_FOUND,
                                "[E_FILE_NOT_FOUND] filePath:%ls", filePath.GetPointer());
 
        r = dec.Construct(filePath, pixelFormat, IMG_FORMAT_NONE, autoRotate);
index 95222d2..0968f5b 100644 (file)
@@ -2233,7 +2233,7 @@ _ImageUtil::GetImageFormat(const Tizen::Base::String& srcImageFile)
        ByteBuffer* pBuf = null;
 
        pBuf = _MediaUtil::FileToBufferN(srcImageFile, _ImageUtil::MinImageFormatLength());
-       SysTryCatch(NID_MEDIA, pBuf != null, , GetLastResult(),
+       SysSecureTryCatch(NID_MEDIA, pBuf != null, , GetLastResult(),
                "[%s] _MediaUtil::FileToBufferN failed for %ls.",
                GetErrorMessage(GetLastResult()), srcImageFile.GetPointer());
 
@@ -2258,7 +2258,7 @@ _ImageUtil::HasAlphaChannel(const Tizen::Base::String& srcImageFile)
        ByteBuffer* pBuf = null;
 
        pBuf = _MediaUtil::FileToBufferN(srcImageFile);
-       SysTryCatch(NID_MEDIA, pBuf != null, , GetLastResult(),
+       SysSecureTryCatch(NID_MEDIA, pBuf != null, , GetLastResult(),
                "[%s] _MediaUtil::FileToBufferN failed for %ls.",
                GetErrorMessage(GetLastResult()), srcImageFile.GetPointer());
        hasAlpha = HasAlphaChannel(*pBuf);
index 81b44db..2aa964e 100644 (file)
@@ -43,18 +43,18 @@ _MediaUtil::FileToBufferN(const Tizen::Base::String &path, int maxSize)
                "[E_FILE_NOT_FOUND] path is empty");
        SysTryReturn(NID_MEDIA, path.GetLength() > 0 && path.GetLength() <= PATH_MAX, null, E_INVALID_ARG,
                "[E_INVALID_ARG] Given filePath length is zero or exceeds system limitations.");
-       SysTryReturn(NID_MEDIA, File::IsFileExist(path), null, E_FILE_NOT_FOUND,
+       SysSecureTryReturn(NID_MEDIA, File::IsFileExist(path), null, E_FILE_NOT_FOUND,
                "[E_FILE_NOT_FOUND] filePath:%ls", path.GetPointer());
 
        r = file.Construct(path, L"rb");
-       SysTryReturn(NID_MEDIA, r == E_SUCCESS, null, r,
+       SysSecureTryReturn(NID_MEDIA, r == E_SUCCESS, null, r,
                "[%s] file.Construct failed. File name (%ls)", GetErrorMessage(r), path.GetPointer());
 
        file.Seek(FILESEEKPOSITION_END, 0);
        size = file.Tell();
        file.Seek(FILESEEKPOSITION_BEGIN, 0);
 
-       SysTryReturn(NID_MEDIA, size > 0, null, E_DATA_NOT_FOUND,
+       SysSecureTryReturn(NID_MEDIA, size > 0, null, E_DATA_NOT_FOUND,
                "[E_DATA_NOT_FOUND] File size is 0: %ls", path.GetPointer());
 
        pBuf.reset(new (std::nothrow) ByteBuffer());
@@ -68,7 +68,7 @@ _MediaUtil::FileToBufferN(const Tizen::Base::String &path, int maxSize)
                        GetErrorMessage(r), size);
 
                r = file.Read(*pBuf.get());
-               SysTryReturn(NID_MEDIA, r == E_SUCCESS, null, r, "[%s] Propagated. File.Read failed: %ls",
+               SysSecureTryReturn(NID_MEDIA, r == E_SUCCESS, null, r, "[%s] Propagated. File.Read failed: %ls",
                        GetErrorMessage(r), path.GetPointer());
        }
        else
@@ -78,7 +78,7 @@ _MediaUtil::FileToBufferN(const Tizen::Base::String &path, int maxSize)
                        GetErrorMessage(r), maxSize);
 
                r = file.Read(*pBuf.get());
-               SysTryReturn(NID_MEDIA, r == E_SUCCESS, null, r, "[%s] Propagated. File.Read failed: %ls",
+               SysSecureTryReturn(NID_MEDIA, r == E_SUCCESS, null, r, "[%s] Propagated. File.Read failed: %ls",
                        GetErrorMessage(r), path.GetPointer());
        }
 
@@ -109,10 +109,10 @@ _MediaUtil::BufferToFile(const Tizen::Base::ByteBuffer &srcBuf,
        }
 
        r = file.Construct(dstPath, "wb", true);
-       SysTryCatch(NID_MEDIA, r == E_SUCCESS, , r, "[%s] Propagated. File.Construct failed for %ls",
+       SysSecureTryCatch(NID_MEDIA, r == E_SUCCESS, , r, "[%s] Propagated. File.Construct failed for %ls",
                GetErrorMessage(r), dstPath.GetPointer());
        r = file.Write(srcBuf);
-       SysTryCatch(NID_MEDIA, r == E_SUCCESS, , r, "[%s] Propagated. File.Write failed for %ls",
+       SysSecureTryCatch(NID_MEDIA, r == E_SUCCESS, , r, "[%s] Propagated. File.Write failed for %ls",
                GetErrorMessage(r), dstPath.GetPointer());
 
 CATCH: