coverity#705989 silence Insecure temporary file
and coverity#705983 Insecure temporary file Change-Id: I2a501f8114ddf8968381e1880263abaf9d1bdc6f
This commit is contained in:
@@ -24,6 +24,7 @@ $(eval $(call gb_Library_use_libraries,scn,\
|
|||||||
svt \
|
svt \
|
||||||
vcl \
|
vcl \
|
||||||
tl \
|
tl \
|
||||||
|
utl \
|
||||||
comphelper \
|
comphelper \
|
||||||
cppuhelper \
|
cppuhelper \
|
||||||
cppu \
|
cppu \
|
||||||
|
@@ -21,6 +21,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <osl/file.h>
|
#include <osl/file.h>
|
||||||
#include <tools/stream.hxx>
|
#include <tools/stream.hxx>
|
||||||
|
#include <unotools/tempfile.hxx>
|
||||||
#include <sane.hxx>
|
#include <sane.hxx>
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -694,7 +695,9 @@ bool Sane::Start( BitmapTransporter& rBitmap )
|
|||||||
if( nStatus != SANE_STATUS_GOOD )
|
if( nStatus != SANE_STATUS_GOOD )
|
||||||
bSynchronousRead = true;
|
bSynchronousRead = true;
|
||||||
}
|
}
|
||||||
FILE* pFrame = tmpfile();
|
utl::TempFile aFrame;
|
||||||
|
aFrame.EnableKillingFile();
|
||||||
|
FILE* pFrame = fopen(OUStringToOString(aFrame.GetFileName(), osl_getThreadTextEncoding()).getStr(), "wb");
|
||||||
if( ! pFrame )
|
if( ! pFrame )
|
||||||
{
|
{
|
||||||
bSuccess = false;
|
bSuccess = false;
|
||||||
|
@@ -35,6 +35,8 @@
|
|||||||
#include "rtl/ustring.hxx"
|
#include "rtl/ustring.hxx"
|
||||||
#include "rtl/strbuf.hxx"
|
#include "rtl/strbuf.hxx"
|
||||||
|
|
||||||
|
#include <unotools/tempfile.hxx>
|
||||||
|
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
@@ -59,9 +61,6 @@ GlyphSet::~GlyphSet ()
|
|||||||
/* FIXME delete the glyphlist ??? */
|
/* FIXME delete the glyphlist ??? */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
GlyphSet::GetCharID (
|
GlyphSet::GetCharID (
|
||||||
sal_Unicode nChar,
|
sal_Unicode nChar,
|
||||||
@@ -742,7 +741,10 @@ GlyphSet::PSUploadFont (osl::File& rOutFile, PrinterGfx &rGfx, bool bAllowType42
|
|||||||
sal_Int32 nSuccess = OpenTTFontFile(aTTFileName.getStr(), nFace, &pTTFont);
|
sal_Int32 nSuccess = OpenTTFontFile(aTTFileName.getStr(), nFace, &pTTFont);
|
||||||
if (nSuccess != SF_OK)
|
if (nSuccess != SF_OK)
|
||||||
return false;
|
return false;
|
||||||
FILE* pTmpFile = tmpfile();
|
|
||||||
|
utl::TempFile aTmpFile;
|
||||||
|
aTmpFile.EnableKillingFile();
|
||||||
|
FILE* pTmpFile = fopen(OUStringToOString(aTmpFile.GetFileName(), osl_getThreadTextEncoding()).getStr(), "wb");
|
||||||
if (pTmpFile == NULL)
|
if (pTmpFile == NULL)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user