diff options
author | Herbert Dürr <hdu@apache.org> | 2012-06-14 08:42:47 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-03-07 11:25:41 +0000 |
commit | be5587ce0c13901acffe664d71bf22f0cb60918a (patch) | |
tree | baf5c2256ca028cd2a19e3c0d0ce45a93c6fc341 /vcl | |
parent | ce740afe80a3230dd66b820f428467b82b89dee2 (diff) |
c#705440# check ftell return value when emitting Type1 subset
Conflicts:
vcl/source/fontsubset/cff.cxx
Change-Id: Idaf328b48a55fbcef13746f74120c13b6b435c93
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/fontsubset/cff.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx index dabc634252da..43e397ca89d4 100644 --- a/vcl/source/fontsubset/cff.cxx +++ b/vcl/source/fontsubset/cff.cxx @@ -1920,10 +1920,11 @@ size_t Type1Emitter::updateLen( int nTellPos, size_t nLength) cData[1] = static_cast<U8>(nLength >> 8); cData[2] = static_cast<U8>(nLength >> 16); cData[3] = static_cast<U8>(nLength >> 24); - const int nCurrPos = ftell( mpFileOut); + const long nCurrPos = ftell( mpFileOut); fseek( mpFileOut, nTellPos, SEEK_SET); size_t nWrote = fwrite( cData, 1, sizeof(cData), mpFileOut); - fseek( mpFileOut, nCurrPos, SEEK_SET); + if( nCurrPos >= 0) + fseek( mpFileOut, nCurrPos, SEEK_SET); return nWrote; } |