diff options
author | Noel Grandin <noel@peralex.com> | 2014-11-10 13:54:37 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-11-10 13:57:41 +0200 |
commit | 8fc7e856ccc3ba19158c6d86d507d9b7a0b140b8 (patch) | |
tree | 664a1f287100c23cafebcc11e437f4ee886406fa /vcl | |
parent | Disable problematic sorting test that depends on the old default. (diff) | |
download | core-8fc7e856ccc3ba19158c6d86d507d9b7a0b140b8.tar.gz core-8fc7e856ccc3ba19158c6d86d507d9b7a0b140b8.zip |
cid#736944 Time of check time of use
Change-Id: Ie9160e8d5ee7f8416a4526a280db23316488a2a1
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/generic/print/genpspgraphics.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/vcl/generic/print/genpspgraphics.cxx b/vcl/generic/print/genpspgraphics.cxx index 3b2ce07de4a9..db904da984cf 100644 --- a/vcl/generic/print/genpspgraphics.cxx +++ b/vcl/generic/print/genpspgraphics.cxx @@ -1247,12 +1247,15 @@ const void* GenPspGraphics::DoGetEmbedFontData( psp::fontID aFont, const sal_Ucs OString aSysPath = rMgr.getFontFileSysPath( aFont ); #if defined( UNX ) - struct stat aStat; - if( stat( aSysPath.getStr(), &aStat ) ) - return NULL; int fd = open( aSysPath.getStr(), O_RDONLY ); if( fd < 0 ) return NULL; + struct stat aStat; + if( fstat( fd, &aStat ) ) + { + close( fd ); + return NULL; + } void* pFile = mmap( NULL, aStat.st_size, PROT_READ, MAP_SHARED, fd, 0 ); close( fd ); if( pFile == MAP_FAILED ) |