Displaying 1 result from an estimated 1 matches for "codeai".
Did you mean:
codea
2017 May 19
1
Null pointer dereference?
...this type1fontinfo
1008: */
1009: font->metrics.KernPairs = NULL;
1010: if (!font)
1011: warning(_("failed to allocate Type 1 font info"));
1012: return font;
1013: }
`font` is conceivably null because there is a null check on line 1010,
but is dereferenced on 1009.
CodeAi, an automated repair tool being developed at Qbit logic,
suggested an if-guard as a fix:
@@ -1006,9 +1006,7 @@ static type1fontinfo makeType1Font()
* load this font and have to
* bail out and free this type1fontinfo
*/
- if(font) {
- font->metrics.KernPairs = NULL;
-...