Kaydet (Commit) 98cf7063 authored tarafından Caolán McNamara's avatar Caolán McNamara

ofz: Integer-overflow

Change-Id: I4f5e133195b46839da96952952ad119855dfbddf
Reviewed-on: https://gerrit.libreoffice.org/58948
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 364b559e
......@@ -18,6 +18,7 @@
*/
#include <comphelper/string.hxx>
#include <o3tl/safeint.hxx>
#include <tools/stream.hxx>
#include <tools/debug.hxx>
#include <tools/color.hxx>
......@@ -2027,7 +2028,10 @@ bool HTMLParser::ParseMetaOptionsImpl(
if (comphelper::string::getTokenCount(aContent, ';') == 2)
{
Date aDate(aContent.getToken(0, ';').toInt32());
tools::Time aTime(aContent.getToken(1, ';').toInt64());
auto nTime = aContent.getToken(1, ';').toInt64();
if (nTime < 0)
nTime = o3tl::saturating_toggle_sign(nTime);
tools::Time aTime(nTime);
DateTime aDateTime(aDate, aTime);
uDT = aDateTime.GetUNODateTime();
valid = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment