From b0b553651038f5516fa8becd44ec96856bcc71a6 Mon Sep 17 00:00:00 2001 From: ace20022 Date: Thu, 7 Apr 2016 13:02:06 +0200 Subject: [fix] CID 1358356, 1358357, 1358358: Out-of-bounds write (OVERRUN). --- lib/libexif/ExifParse.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/libexif/ExifParse.cpp') diff --git a/lib/libexif/ExifParse.cpp b/lib/libexif/ExifParse.cpp index 0497c4e84d..03b9263c1c 100755 --- a/lib/libexif/ExifParse.cpp +++ b/lib/libexif/ExifParse.cpp @@ -425,7 +425,7 @@ void CExifParse::ProcessDir(const unsigned char* const DirStart, if (space > 0) { strncpy(m_ExifInfo->CameraMake, (char *)ValuePtr, space - 1); - m_ExifInfo->CameraMake[space] = '\0'; + m_ExifInfo->CameraMake[space - 1] = '\0'; } break; } @@ -435,7 +435,7 @@ void CExifParse::ProcessDir(const unsigned char* const DirStart, if (space > 0) { strncpy(m_ExifInfo->CameraModel, (char *)ValuePtr, space - 1); - m_ExifInfo->CameraModel[space] = '\0'; + m_ExifInfo->CameraModel[space - 1] = '\0'; } break; } @@ -455,7 +455,7 @@ void CExifParse::ProcessDir(const unsigned char* const DirStart, if (space > 0) { strncpy(m_ExifInfo->DateTime, (char *)ValuePtr, space - 1); - m_ExifInfo->DateTime[space] = '\0'; + m_ExifInfo->DateTime[space - 1] = '\0'; // If we get a DATETIME_ORIGINAL, we use that one. m_DateFound = true; } @@ -472,7 +472,7 @@ void CExifParse::ProcessDir(const unsigned char* const DirStart, if (space > 0) { strncpy(m_ExifInfo->DateTime, (char *)ValuePtr, space - 1); - m_ExifInfo->DateTime[space] = '\0'; + m_ExifInfo->DateTime[space - 1] = '\0'; } } break; -- cgit v1.2.3