Skip to content

Commit e68ba5d

Browse files
authored
decode: fix invalid error return for 0-length EXIF (#248)
1 parent 4d185a8 commit e68ba5d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

spng/spng.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2691,6 +2691,7 @@ static int read_non_idat_chunks(spng_ctx *ctx)
26912691
if(!memcmp(chunk.type, type_exif, 4))
26922692
{
26932693
if(ctx->file.exif) return SPNG_EDUP_EXIF;
2694+
if(!chunk.length) return SPNG_EEXIF;
26942695

26952696
ctx->file.exif = 1;
26962697

0 commit comments

Comments
 (0)