path: root/fofi
AgeCommit message (Collapse)AuthorFilesLines
2019-12-02enable modernize-use-bool-literalsAlbert Astals Cid1-1/+1
No copyright, this is a mechanical change
2019-12-02Enable modernize-use-overrideAlbert Astals Cid4-6/+6
not claiming copyright for this since it's a mechanical change
2019-11-29Enable modernize-deprecated-headersAlbert Astals Cid7-17/+17
2019-09-29Move the const_cast from assignment to freeAlbert Astals Cid2-11/+12
The problem is that some of the times the pointers hold values to const tables and some others hold values to dynamic memory. Instead of const_casting the const tables when needed and holding a non const pointer, we hold a const pointer and only const cast on free if needed
2019-09-29Update (C) from previous commitAlbert Astals Cid3-0/+3
2019-09-29Make some static data tables constVolker Krause3-9/+9
This moves 14.4kB from .data to .rodata, and another 11.6kB from .data to
2019-09-27Update (C) of previous commitAlbert Astals Cid4-4/+4
2019-09-27Add some constAlbert Astals Cid4-8/+8
Suggested by clang-tidy readability-non-const-parameter check
2019-04-10avoid more C4310himajin1000001-4/+5
2019-03-31ofz-8443: Integer-overflow in identifyCFFLE GARREC Vincent1-3/+5
2019-02-02Integer-overflow in FoFiBase::checkRegionVincent Le Garrec1-0/+2
2019-01-05Update (C) of previous commitsAlbert Astals Cid2-0/+2
2019-01-03all: Use the openFile fopen wrapper from gfile.hChristian Persch2-2/+4
Use the openFile wrapper instead of calling fopen directly in the libraries.
2018-12-06Remove the file gtypes.h completelyOliver Sander7-9/+0
2018-12-06Replace Guint by unsigned intOliver Sander6-105/+105
2018-12-06Replace Gushort by unsigned shortOliver Sander4-17/+17
2018-12-06Replace Guchar by unsigned charOliver Sander7-68/+68
2018-11-11Rename GooString::getCString GooString::c_strOliver Sander2-108/+108
This is the name used by std::string.
2018-11-09Pass small and trivially-copyable type by valueAlbert Astals Cid1-2/+2
2018-10-23Replace GBool, gTrue, and gFalse by bool, true, false, resp.Oliver Sander9-333/+333
These are just non-standard names for bool, true, false, respectively. Getting rid of these names saves on layer of mental redirection, and enables proper syntax highlighting in editors.
2018-10-10Remove usage of pragmas interface and implementationAdam Reichold12-48/+0
GCC recommends not using them for a long time and its documentation says: > These #pragmas have been superceded as of GCC 2.7.2 by COMDAT support > and the “key method” heuristic mentioned in Vague Linkage. > Using them can actually cause your program to grow due to > unnecessary out-of-line copies of inline functions. Also nobody seems to set USE_GCC_PRAGMAS and sometimes they were guarded by just __GNUC__ which upsets Clang.
2018-09-23FoFiType1C::getIndexVal: Don't calculate val if it's not okAlbert Astals Cid1-0/+1
No need to do extra work if we're saying it won't be used Fixes oss-fuzz/10632
2018-09-23More constAlbert Astals Cid1-1/+1
2018-09-23FoFiType1: Some more constAlbert Astals Cid2-10/+10
2018-09-23FoFiType1C: more constAlbert Astals Cid2-20/+20
2018-09-23FoFiTrueType: More constAlbert Astals Cid2-49/+49
2018-09-23Don't cast nullptrAlbert Astals Cid2-2/+2
Doesn't make any sense
2018-09-23FoFiTrueType: some more constAlbert Astals Cid2-12/+12
2018-09-23FoFiType1C: Some more constAlbert Astals Cid2-4/+4
2018-09-23FoFiBase: No need to store two pointersAlbert Astals Cid3-8/+7
that point to the same place And also make the data const (until the moment we have to free it)
2018-09-23FoFiTrueType: Some more constAlbert Astals Cid2-4/+4
2018-09-23FoFiXXX: Make the filenames const char *Albert Astals Cid8-11/+25
2018-09-23FoFiType1C: Add some constAlbert Astals Cid2-18/+18
2018-09-23FoFiBase: Add some constAlbert Astals Cid2-19/+19
2018-09-23FoFiIdentifier: make two char * be const char*Albert Astals Cid2-11/+25
2018-09-22Check that Type1C font dict offset and length do not overflow integer ↵Adam Reichold1-7/+16
positions. oss-fuzz/8633
2018-08-31FoFiType1C::getDeltaIntArray: Fix undefined inf to int conversionAlbert Astals Cid1-0/+3
2018-08-31(C) of previous commitsAlbert Astals Cid1-0/+1
2018-08-31Fix delta decoding for Type1C fonts to avoid signed integer overflow. ↵Adam Reichold1-1/+5
2018-06-22(C) update from 2 commits agoAlbert Astals Cid1-0/+1
2018-06-22FoFiType1C::readPrivateDict: Fix potential uninitialized memory readAlbert Astals Cid2-5/+3
fixes oss-fuzz/8864
2018-05-28FoFiType1::parse: Don't copy to buf more than the available fileAlbert Astals Cid1-2/+4
fixes oss-fuzz/8576
2018-05-27FoFiType1::parse: Fix reading past font lengthAlbert Astals Cid1-2/+4
fixes oss-fuzz/8545
2018-05-25FoFiType1C::readTopDict: Return early if parsing failsAlbert Astals Cid1-0/+3
fixes oss-fuzz/8456
2018-05-24FoFiType1::parse: Fix invalid memory accessAlbert Astals Cid1-2/+8
Make sure there's enough line left before calling strncmp fixes oss-fuzz/8425
2018-05-24StreamReader::cmp: Fix potential undefined behaviourAlbert Astals Cid1-4/+3
going outside an array range is technically undefined behaviour, even if then after you go back in range with the next operation, so we first calculate the diff and then add it to the array
2018-05-06Replace GooHash by std::unordered_map in FoFiTrueType.Adam Reichold2-27/+20
2018-05-01FoFiType1C::cvtGlyph: Fix infinite recursion on malformed documentsAlbert Astals Cid1-3/+4
Bugs #104942, #103238
2018-01-08Run clang-tidy with modernize nullptrAlbert Astals Cid6-242/+242
Also add two enum values in the qt5 frontend to representate no flags Also mark glib/gtk/cairo system includes so that gcc doesn't report the issues in those headers
2018-01-08Delete lots of copy constructors and copy assignment operatorsAlbert Astals Cid2-0/+20
Fixes rule-of-three and copyable-polymorphic warnings reported by clazy. The default copy constructor and copy assignment operator are only valid for simple classes so we delete them (i.e. make then not exist) when we have either a virtual class or a destructor, the code still compiles so this doesn't fix any bug, it is more a protection for when you think you can copy a class and don't realize the default copy constrcutor is not doing what you want and you get crashes. Hopefully this helps us in the future :)