summaryrefslogtreecommitdiff
path: root/vcl/generic/print
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-11-14 11:06:44 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-11-14 12:02:49 +0000
commitbbf3aa7f92c194c9cc4546c95706e6b28e0c070c (patch)
tree93467eccdc8f3b2f1acb867c18d988665ca9aa99 /vcl/generic/print
parent64cc39e0c576611297625ebcac8d48613a5bb175 (diff)
coverity#705989 silence Insecure temporary file
and coverity#705983 Insecure temporary file Change-Id: I2a501f8114ddf8968381e1880263abaf9d1bdc6f
Diffstat (limited to 'vcl/generic/print')
-rw-r--r--vcl/generic/print/glyphset.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/vcl/generic/print/glyphset.cxx b/vcl/generic/print/glyphset.cxx
index 285ee4b478c6..30946a374ae3 100644
--- a/vcl/generic/print/glyphset.cxx
+++ b/vcl/generic/print/glyphset.cxx
@@ -35,6 +35,8 @@
#include "rtl/ustring.hxx"
#include "rtl/strbuf.hxx"
+#include <unotools/tempfile.hxx>
+
#include <set>
#include <map>
#include <algorithm>
@@ -59,9 +61,6 @@ GlyphSet::~GlyphSet ()
/* FIXME delete the glyphlist ??? */
}
-
-
-
bool
GlyphSet::GetCharID (
sal_Unicode nChar,
@@ -742,7 +741,10 @@ GlyphSet::PSUploadFont (osl::File& rOutFile, PrinterGfx &rGfx, bool bAllowType42
sal_Int32 nSuccess = OpenTTFontFile(aTTFileName.getStr(), nFace, &pTTFont);
if (nSuccess != SF_OK)
return false;
- FILE* pTmpFile = tmpfile();
+
+ utl::TempFile aTmpFile;
+ aTmpFile.EnableKillingFile();
+ FILE* pTmpFile = fopen(OUStringToOString(aTmpFile.GetFileName(), osl_getThreadTextEncoding()).getStr(), "wb");
if (pTmpFile == NULL)
return false;