[Libreoffice-commits] core.git: sw/source ucb/source xmloff/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sun Jul 21 11:50:53 UTC 2019
sw/source/filter/ww8/docxattributeoutput.cxx | 1 +
ucb/source/ucp/file/filtask.cxx | 1 +
xmloff/source/style/XMLFontAutoStylePool.cxx | 5 +++--
3 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit bac57f75cd18472167742e804d789ffbc43fa9a9
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Jul 20 15:14:06 2019 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Jul 21 13:49:46 2019 +0200
cid#1448305 silence Out-of-bounds access
Change-Id: I7a25cc0c30f06ec146bdc205c51d5cad70e713b1
Reviewed-on: https://gerrit.libreoffice.org/76014
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index c67971cc86b6..0deed645675c 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -6489,6 +6489,7 @@ void DocxAttributeOutput::EmbedFontStyle( const OUString& name, int tag, FontFam
}
if( readSize == 0 )
break;
+ // coverity[overrun-buffer-arg : FALSE] - coverity has difficulty with css::uno::Sequence
xOutStream->writeBytes( uno::Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( buffer ), readSize ));
}
xOutStream->closeOutput();
diff --git a/ucb/source/ucp/file/filtask.cxx b/ucb/source/ucp/file/filtask.cxx
index 163852099a20..761e248799a4 100644
--- a/ucb/source/ucp/file/filtask.cxx
+++ b/ucb/source/ucp/file/filtask.cxx
@@ -648,6 +648,7 @@ void TaskManager::page( sal_Int32 CommandId,
err = aFile.read( static_cast<void*>(BFF),bfz,nrc );
if( err == osl::FileBase::E_None )
{
+ // coverity[overrun-buffer-arg : FALSE] - coverity has difficulty with css::uno::Sequence
uno::Sequence< sal_Int8 > seq( BFF, static_cast<sal_uInt32>(nrc) );
try
{
diff --git a/xmloff/source/style/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx
index d16997977f10..b89525f75442 100644
--- a/xmloff/source/style/XMLFontAutoStylePool.cxx
+++ b/xmloff/source/style/XMLFontAutoStylePool.cxx
@@ -617,7 +617,7 @@ OUString XMLFontAutoStylePool::embedFontFile(OUString const & fileUrl, OUString
propertySet->setPropertyValue( "MediaType", uno::makeAny( OUString( "application/x-font-ttf" ))); // TODO
for(;;)
{
- char buffer[ 4096 ];
+ sal_Int8 buffer[ 4096 ];
sal_uInt64 readSize;
sal_Bool eof;
if( file.isEndOfFile( &eof ) != osl::File::E_None )
@@ -636,7 +636,8 @@ OUString XMLFontAutoStylePool::embedFontFile(OUString const & fileUrl, OUString
}
if( readSize == 0 )
break;
- outputStream->writeBytes( uno::Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( buffer ), readSize ));
+ // coverity[overrun-buffer-arg : FALSE] - coverity has difficulty with css::uno::Sequence
+ outputStream->writeBytes(uno::Sequence<sal_Int8>(buffer, readSize));
}
outputStream->closeOutput();
if( storage.is() )
More information about the Libreoffice-commits
mailing list