Small bug in juce_loadJPEGImageFromStream


#1

Hi Jules,

on line 255 of juce_JPEGLoader.cpp,

in.setPosition (((char*) jpegDecompStruct.src->next_input_byte) - (char*) mb.getData());

is accessing data that was freed just before by jpeg_destroy_decompress

(valgrind rocks)


#2

doh! I don’t usually do anything as dumb as that! Thanks for spotting it!