You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, according to the specification, chunk type is restricted to the decimal values 65 to 90 and 97 to 122.
Maybe this could be fixed at the function decodeGeneric by replacing
else /*it's not an implemented chunk type, so ignore it: skip over the data*/ {
/*error: unknown critical chunk (5th bit of first byte of chunk type is 0)*/
if(!state->decoder.ignore_critical && !lodepng_chunk_ancillary(chunk)) {
CERROR_BREAK(state->error, 69);
}
with
else /*it's not an implemented chunk type, so ignore it: skip over the data*/ {
/*error: unknown critical chunk (5th bit of first byte of chunk type is 0)*/
unsigned i;
for(i = 0; i != 4; ++i)
if (!((chunk[i+4]>='a' && chunk[i+4]<='z') || (chunk[i+4]>='A' && chunk[i+4]<='Z'))) {
CERROR_BREAK(state->error, 116); // invalid chunk type
}
if(!state->decoder.ignore_critical && !lodepng_chunk_ancillary(chunk)) {
CERROR_BREAK(state->error, 69);
}
This rule is meaningful and it can allow safe, flexible extension of the PNG format according to the specification.
The text was updated successfully, but these errors were encountered:
Hi, according to the specification, chunk type is restricted to the decimal values 65 to 90 and 97 to 122.
Maybe this could be fixed at the function
decodeGeneric
by replacingwith
This rule is meaningful and it can allow safe, flexible extension of the PNG format according to the specification.
The text was updated successfully, but these errors were encountered: