jhead icon indicating copy to clipboard operation
jhead copied to clipboard

Doesn't check for obscure JFXX

Open GatoRat opened this issue 2 years ago • 0 comments

There is a JFIF extension that uses JFXX. Years ago, I ran across a very old jpg that used it (I looked but can't find it.)

https://en.wikipedia.org/wiki/JPEG_File_Interchange_Format#JFIF_extension_APP0_marker_segment

I did a quick fix at what is line 258 of jpgfile.c:

            if (memcmp(Data+2, "JFIF\0",5) &&  memcmp(Data+2, "JFXX\0",5)){
                fprintf(stderr,"Header missing JFIF marker\n");
            }

I'm not sure of the full implications nor whether it's worth fixing, just thought I'd note it.

GatoRat avatar Dec 13 '23 02:12 GatoRat