Skip to content

Commit

Permalink
load_analyze(): Check that header size is at least 4.
Browse files Browse the repository at this point in the history
  • Loading branch information
dtschump committed Nov 25, 2023
1 parent 6a97a52 commit c214dfe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CImg.h
Expand Up @@ -56062,7 +56062,7 @@ namespace cimg_library {
bool endian = false;
unsigned int header_size;
cimg::fread(&header_size,1,nfile_header);
if (!header_size || header_size<4)
if (!header_size || header_size<=4)
throw CImgIOException(_cimg_instance
"load_analyze(): Invalid header size (%u) specified in file '%s'.",
cimg_instance,
Expand Down

0 comments on commit c214dfe

Please sign in to comment.