summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/filter/html/htmlex.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 56f4caf9d1a8..a52d5b3b7575 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -1080,7 +1080,9 @@ OUString HtmlExport::DocumentMetadata() const
" ", RTL_TEXTENCODING_UTF8,
&aNonConvertableCharacters);
- OString aData(static_cast<const char*>(aStream.GetData()), aStream.GetSize());
+ const sal_uInt64 nLen = aStream.GetSize();
+ OSL_ENSURE(nLen < static_cast<sal_uInt64>(SAL_MAX_INT32), "Stream can't fit in OString");
+ OString aData(static_cast<const char*>(aStream.GetData()), static_cast<sal_Int32>(nLen));
return OStringToOUString(aData, RTL_TEXTENCODING_UTF8);
}