[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - extensions/source vcl/generic

Caolán McNamara caolanm at redhat.com
Tue Jan 27 05:24:26 PST 2015


 extensions/source/scanner/sane.cxx |    2 +-
 vcl/generic/print/glyphset.cxx     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 59a49499241030ecdf68c2d4c13ce26fe1f4b380
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jan 27 10:22:30 2015 +0000

    Resolves: tdf#88819 printing with ps hangs
    
    regression from
    
    commit bbf3aa7f92c194c9cc4546c95706e6b28e0c070c
    Author: Caolán McNamara <caolanm at redhat.com>
    Date:   Fri Nov 14 11:06:44 2014 +0000
        coverity#705989 silence Insecure temporary file
        and
        coverity#705983 Insecure temporary file
    
    Change-Id: If580196322e68098adc38a9fdb775827843a9c30
    Reviewed-on: https://gerrit.libreoffice.org/14202
    Tested-by: Michael Stahl <mstahl at redhat.com>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/extensions/source/scanner/sane.cxx b/extensions/source/scanner/sane.cxx
index 84475d5..26cb83a 100644
--- a/extensions/source/scanner/sane.cxx
+++ b/extensions/source/scanner/sane.cxx
@@ -697,7 +697,7 @@ bool Sane::Start( BitmapTransporter& rBitmap )
             }
             utl::TempFile aFrame;
             aFrame.EnableKillingFile();
-            FILE* pFrame = fopen(OUStringToOString(aFrame.GetFileName(), osl_getThreadTextEncoding()).getStr(), "wb");
+            FILE* pFrame = fopen(OUStringToOString(aFrame.GetFileName(), osl_getThreadTextEncoding()).getStr(), "w+b");
             if( ! pFrame )
             {
                 bSuccess = false;
diff --git a/vcl/generic/print/glyphset.cxx b/vcl/generic/print/glyphset.cxx
index 30946a3..405e0e8 100644
--- a/vcl/generic/print/glyphset.cxx
+++ b/vcl/generic/print/glyphset.cxx
@@ -744,7 +744,7 @@ GlyphSet::PSUploadFont (osl::File& rOutFile, PrinterGfx &rGfx, bool bAllowType42
 
     utl::TempFile aTmpFile;
     aTmpFile.EnableKillingFile();
-    FILE* pTmpFile = fopen(OUStringToOString(aTmpFile.GetFileName(), osl_getThreadTextEncoding()).getStr(), "wb");
+    FILE* pTmpFile = fopen(OUStringToOString(aTmpFile.GetFileName(), osl_getThreadTextEncoding()).getStr(), "w+b");
     if (pTmpFile == NULL)
         return false;
 


More information about the Libreoffice-commits mailing list