Skip to content

Commit

Permalink
dont check tEXt, zTXt chunk text fields in default mode
Browse files Browse the repository at this point in the history
  • Loading branch information
randy408 authored Aug 14, 2020
2 parents 7a2ac10 + 367a856 commit db86b2c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spng/spng.c
Original file line number Diff line number Diff line change
Expand Up @@ -2195,7 +2195,11 @@ static int read_non_idat_chunks(spng_ctx *ctx)
language_tag_offset = keyword_len;
translated_keyword_offset = keyword_len;

if(check_png_text(text->text, text->text_length)) return SPNG_ETEXT;
if(ctx->strict && check_png_text(text->text, text->text_length))
{
if(text->type == SPNG_ZTXT) return SPNG_EZTXT;
else return SPNG_ETEXT;
}
}

text->language_tag = text->keyword + language_tag_offset;
Expand Down

0 comments on commit db86b2c

Please sign in to comment.