diff options
author | Albert Astals Cid <aacid@kde.org> | 2009-05-20 23:08:41 +0200 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2009-05-20 23:08:41 +0200 |
commit | 0c3517bfb4e1e1a28962f8d490ad69ec5766b6a1 (patch) | |
tree | c60f54988ecd6eb9f14c7fed49e3fd28aed52102 /fofi | |
parent | 548c72600b8a5e076647041660ed5031feedc7cc (diff) |
Fix pdftops crash on file from KDE bug 174899
Still does not generate a correct ps file, but at least the program does not crash now
Diffstat (limited to 'fofi')
-rw-r--r-- | fofi/FoFiTrueType.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fofi/FoFiTrueType.cc b/fofi/FoFiTrueType.cc index b7f3f6c1..d716638c 100644 --- a/fofi/FoFiTrueType.cc +++ b/fofi/FoFiTrueType.cc @@ -16,7 +16,7 @@ // Copyright (C) 2006 Takashi Iwai <tiwai@suse.de> // Copyright (C) 2007 Koji Otani <sho@bbr.jp> // Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2008 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2008, 2009 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2008 Tomas Are Haavet <tomasare@gmail.com> // // To see a description of the changes please see the Changelog file that @@ -1539,6 +1539,9 @@ void FoFiTrueType::cvtSfnts(FoFiOutputFunc outputFunc, // construct the 'head' table, zero out the font checksum i = seekTable("head"); + if (i < 0 || i >= nTables) { + return; + } pos = tables[i].offset; if (!checkRegion(pos, 54)) { return; |