aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorace20022 <ace20022@ymail.com>2016-04-07 13:02:06 +0200
committerace20022 <ace20022@ymail.com>2016-04-07 13:02:06 +0200
commitb0b553651038f5516fa8becd44ec96856bcc71a6 (patch)
tree5a3f631b5c789889cea0165608f211bacb3f0d97 /lib
parent2d8f68ca08ee6e5c10918c0e7bb06eb416e3a0a0 (diff)
[fix] CID 1358356, 1358357, 1358358: Out-of-bounds write (OVERRUN).
Diffstat (limited to 'lib')
-rwxr-xr-xlib/libexif/ExifParse.cpp8
1 files changed, 4 insertions, 4 deletions
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;