Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Eugene1
Beginner
53 Views

Jpeg decoder is crashing

Hi,

Im testing IPP Jpeg decoder from the latest available samples with the latest IPP libs.

X86 version is crashing on some images when I change INPUT_BUF_SIZE to something different from the default value. I have a large number of test images and it looks like crashing jpeg depends on input buffer size.

X64 version is crashing always, even with the default buffer value. I could not tune buffer size to read all my jpegs.

The problem can be reproduced with djpeg application from samples with changing the following value:
[cpp]#define INPUT_BUF_SIZE 100096 [/cpp]

Im getting access violation in jdhuff.c:1001 when memmove tries to use overflowed value as data size.

[cpp] /* Decode a single block's worth of coefficients */ if(state.ipp_need_update == 1) { // fails here memmove(state.ipp_buffer, state.ipp_buffer + state.ipp_bytes_decoded, state.ipp_bytes_in_buffer - state.ipp_bytes_decoded); state.ipp_bytes_in_buffer = state.ipp_bytes_in_buffer - state.ipp_bytes_decoded - ipp_bytes_left - state.sync_shift; //... [/cpp]

Im attaching crashing jpeg for x86 version.

My configuration:

Windows 7 x64
IPP version: 7.0.6.300
w_ipp-samples_p_7.0.6.060

Thanks,
Eugene

0 Kudos
2 Replies
Sergey_K_Intel
Employee
53 Views

Hi Eugene,
Could you specify exactlty what sample you use and how?
> djpeg -bmp test.jpg test.bmp ?
or, other command?
Regards,
Sergey
Eugene1
Beginner
53 Views

Hi Sergey,

Thanks for your attention.

Im using djpeg as you wrote without additional commands:

djpeg.exe -bmp C:\temp\1233\picccszk_CL.jpg C:\temp\1233\out.bmp

It works great with default INPUT_BUF_SIZE, but fails when I set it to 100096 and try to read the attached JPEG.

When I change INPUT_BUF_SIZE constant to something other than 100096, failing jpeg file is changing too.

Best regards,
Eugene
Reply