Menu

Small bug

2013-10-19
2015-06-09
  • Thomas Kroes

    Thomas Kroes - 2013-10-19

    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

     
  • Martin Pulec

    Martin Pulec - 2015-06-09

    Hi Chris,

    you are definitely right! This has been fixed as well some while ago.

    Martin

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.