[content] Add exeption check
authorSeokpil Park <seokpil.park@samsung.com>
Thu, 27 Jun 2013 02:45:59 +0000 (11:45 +0900)
committerSeokpil Park <seokpil.park@samsung.com>
Thu, 27 Jun 2013 03:05:21 +0000 (12:05 +0900)
Change-Id: I588ad773bac00b04a72a966a93a0f7bf7f03ba5f
Signed-off-by: Seokpil Park <seokpil.park@samsung.com>
src/FCnt_ContentManagerUtilImpl.cpp

index 665461a..15a44ca 100755 (executable)
@@ -118,10 +118,7 @@ _ContentManagerUtilImpl::GetImageMetaN(const String& contentPath, bool internal)
                        ExifEntry** pEntries = null;
                        const char* pData = null;
                        char buf[_IMAGE_BUFF_LENGTH] = {0, };
-                       char mmBuff[_IMAGE_BUFF_LENGTH] = {0, }; // to store minutes value of GPS data
-                       char ssBuff[_IMAGE_BUFF_LENGTH] = {0, }; // to store seconds value of GPS data
                        ExifContent* pExifcont[EXIF_IFD_COUNT];
-                       int index = 0;
                        char latitudeRef = 0; // to store latitude reference (quadrasphere designation 'N', 'S', 'W' or 'E')
                        char longitudeRef = 0; // to store longitude reference (quadrasphere designation 'N', 'S', 'W' or 'E')
                        unsigned int entryCount = 0;
@@ -189,7 +186,7 @@ _ContentManagerUtilImpl::GetImageMetaN(const String& contentPath, bool internal)
                                                String token[3] = {L"", };
 
                                                int count = 0;
-                                               while (strTok.HasMoreTokens())
+                                               while (strTok.HasMoreTokens() && count < 3)
                                                {
                                                        strTok.GetNextToken(token[count++]);
                                                }
@@ -227,7 +224,7 @@ _ContentManagerUtilImpl::GetImageMetaN(const String& contentPath, bool internal)
                                                String token[3] = {L"", };
 
                                                int count = 0;
-                                               while (strTok.HasMoreTokens())
+                                               while (strTok.HasMoreTokens() && count < 3)
                                                {
                                                        strTok.GetNextToken(token[count++]);
                                                }
@@ -883,10 +880,7 @@ _ContentManagerUtilImpl::GetImageMetaN(const ByteBuffer& byteBuffer)
                        ExifEntry** pEntries = null;
                        const char* pData = null;
                        char buf[_IMAGE_BUFF_LENGTH] = {0, };
-                       char mmBuff[_IMAGE_BUFF_LENGTH] = {0, }; // to store minutes value of GPS data
-                       char ssBuff[_IMAGE_BUFF_LENGTH] = {0, }; // to store seconds value of GPS data
                        ExifContent* pExifcont[EXIF_IFD_COUNT];
-                       int index = 0;
                        char latitudeRef = 0; // to store latitude reference (quadrasphere designation 'N', 'S', 'W' or 'E')
                        char longitudeRef = 0; // to store longitude reference (quadrasphere designation 'N', 'S', 'W' or 'E')
                        unsigned int entryCount = 0;
@@ -954,7 +948,7 @@ _ContentManagerUtilImpl::GetImageMetaN(const ByteBuffer& byteBuffer)
                                                String token[3] = {L"", };
 
                                                int count = 0;
-                                               while (strTok.HasMoreTokens())
+                                               while (strTok.HasMoreTokens() && count < 3)
                                                {
                                                        strTok.GetNextToken(token[count++]);
                                                }
@@ -992,7 +986,7 @@ _ContentManagerUtilImpl::GetImageMetaN(const ByteBuffer& byteBuffer)
                                                String token[3] = {L"", };
 
                                                int count = 0;
-                                               while (strTok.HasMoreTokens())
+                                               while (strTok.HasMoreTokens() && count < 3)
                                                {
                                                        strTok.GetNextToken(token[count++]);
                                                }