Commit da349184 authored by Albert Astals Cid's avatar Albert Astals Cid

FoFiType1C::readPrivateDict: Fix potential uninitialized memory read

fixes oss-fuzz/8864
parent 877dcec7
......@@ -2564,8 +2564,6 @@ int FoFiType1C::getOp(int pos, GBool charstring, GBool *ok) {
int b0, b1, nyb0, nyb1, x, i;
b0 = getU8(pos++, ok);
op.isNum = gTrue;
op.isFP = gFalse;
if (b0 == 28) {
x = getU8(pos++, ok);
......
......@@ -124,10 +124,10 @@ struct Type1CPrivateDict {
};
struct Type1COp {
GBool isNum; // true -> number, false -> operator
GBool isFP; // true -> floating point number, false -> int
GBool isNum = gTrue; // true -> number, false -> operator
GBool isFP = gFalse; // true -> floating point number, false -> int
union {
double num; // if num is true
double num = 0; // if num is true
int op; // if num is false
};
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment