UIC JPEG decoder in Intel® IPP 6.1 causes access violation

Submit New Article

March 8, 2010 9:30 AM PST


Problem :

In Intel® IPP UIC JPEG decoder sample, CJPEGDecoder::ParseDQT, there is a validity check on the quantization table ID as below and causes an access violation.

if((id & 0x0f) > MAX_QUANT_TABLES)

Environment :

Intel® IPP 6.1 for Windows

Root Cause : 

The quantization table ID is off by one which causes the access violation.

Resolution : 

The line if((id & 0x0f) > MAX_QUANT_TABLES) should be changed to if((id & 0x0f) >= MAX_QUANT_TABLES) becuase the id is used to index an array of size MAX_QUANT_TABLES

This bug has been fixed and the fix will be available in Intel® IPP 7.0 beta onwards.



Do you need more help?


This article applies to: Intel® Integrated Performance Primitives Knowledge Base