Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#32 Infinite loop on corrupt JPEG

closed-accepted
Dario Meloni
None
5
2007-01-18
2007-01-12
No

The attached jpeg causes an infinite loop in il_jpeg.c. skip_input_data. For some reason, src->pub.bytes_in_buffer == 0. Therefore, num_bytes never changes, and the terminating condition never breaks execution of the while loop. Testing

if (num_bytes > 0 && src->pub.bytes_in_buffer > 0)

in line 249 prevents this, but I don't know if this is the cleanest solution.

Discussion

  • Dario Meloni
    Dario Meloni
    2007-01-18

    • assigned_to: nobody --> darkyojimbo
    • status: open --> closed-accepted