vcl/source/filter/imet/ios2met.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 08ccd6d3c45c108b5188e65d328cc23173139109
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed Sep 1 20:10:28 2021 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Sep 2 09:29:12 2021 +0200

    ofz: MemorySanitizer: use-of-uninitialized-value
    
    Change-Id: I08bffde6c08d97d140e2985876a62084035d657f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121484
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/vcl/source/filter/imet/ios2met.cxx 
b/vcl/source/filter/imet/ios2met.cxx
index 774ed1517b9d..0057d3f55808 100644
--- a/vcl/source/filter/imet/ios2met.cxx
+++ b/vcl/source/filter/imet/ios2met.cxx
@@ -2374,8 +2374,7 @@ void OS2METReader::ReadFont(sal_uInt16 nFieldSize)
                     case 0x08: { // Font Typeface
                         char str[33];
                         pOS2MET->SeekRel(1);
-                        pOS2MET->ReadBytes( &str, 32 );
-                        str[ 32 ] = 0;
+                        str[pOS2MET->ReadBytes(str, 32)] = 0;
                         OUString aStr( str, strlen(str), 
osl_getThreadTextEncoding() );
                         if ( aStr.equalsIgnoreAsciiCase( "Helv" ) )
                             aStr = "Helvetica";

Reply via email to