summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHubert Figuière <hub@figuiere.net>2018-02-04 11:57:50 -0500
committerHubert Figuière <hub@figuiere.net>2018-02-04 11:57:50 -0500
commit411fd919f1977aa528f4b35fdcdb996d38cc4a22 (patch)
tree2e3da9fdb0e592089fd591fc120b343ad34d36a4
parentcfb6e41aeaf3d842ea92eac8bf799b9e931dc71a (diff)
Adobe SDK: fix possible sprintf overflow in AVCHD
-rw-r--r--XMPFiles/source/FileHandlers/AVCHD_Handler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/XMPFiles/source/FileHandlers/AVCHD_Handler.cpp b/XMPFiles/source/FileHandlers/AVCHD_Handler.cpp
index c87cfd6..f5fb07d 100644
--- a/XMPFiles/source/FileHandlers/AVCHD_Handler.cpp
+++ b/XMPFiles/source/FileHandlers/AVCHD_Handler.cpp
@@ -1607,7 +1607,7 @@ static void AVCCAM_SetXMPStartTimecode ( SXMPMeta& xmpObj, const XMP_Uns8* avcca
}
if ( dmTimeFormat != NULL ) {
- char timecodeBuff [12];
+ char timecodeBuff [16];
sprintf ( timecodeBuff, "%d%d%c%d%d%c%d%d%c%d%d", hourTens, hourUnits, tcSeparator,
minuteTens, minuteUnits, tcSeparator, secondTens, secondUnits, tcSeparator, frameTens, frameUnits);
@@ -1798,7 +1798,7 @@ static std::string AVCHD_DateFieldToXMP ( XMP_Uns8 avchdTimeZone, const XMP_Uns8
utcOffsetMinutes = 30 * halfHourFlag;
}
- char dateBuff [26];
+ char dateBuff [40];
sprintf ( dateBuff,
"%01d%01d%01d%01d-%01d%01d-%01d%01dT%01d%01d:%01d%01d:%01d%01d%+02d:%02d",