I noticed a runtime while decoding. There is a stack corruption around line 125 in gpujpeg_reader.c.
char jfif[4]; jfif[0] = gpujpeg_reader_read_byte(image); jfif[1] = gpujpeg_reader_read_byte(image); jfif[2] = gpujpeg_reader_read_byte(image); jfif[3] = gpujpeg_reader_read_byte(image); jfif[4] = gpujpeg_reader_read_byte(*image); if ( strcmp(jfif, "JFIF") != 0 ) {
The reason for this stack corruption imo is that the jfif array is too small. It should be char jfif[5];
Other than that I just want to say, very good job! I really like the work!
Thomas
Hi Chris,
you are definitely right! This has been fixed as well some while ago.
Martin
Log in to post a comment.
I noticed a runtime while decoding. There is a stack corruption around line 125 in gpujpeg_reader.c.
char jfif[4];
jfif[0] = gpujpeg_reader_read_byte(image);
jfif[1] = gpujpeg_reader_read_byte(image);
jfif[2] = gpujpeg_reader_read_byte(image);
jfif[3] = gpujpeg_reader_read_byte(image);
jfif[4] = gpujpeg_reader_read_byte(*image);
if ( strcmp(jfif, "JFIF") != 0 ) {
The reason for this stack corruption imo is that the jfif array is too small. It should be char jfif[5];
Other than that I just want to say, very good job! I really like the work!
Thomas
Hi Chris,
you are definitely right! This has been fixed as well some while ago.
Martin