cea6abe379
QAT array for sgls in intermediate buffer structure was #defined to 1, but setup code hardcoded as if 2 buffers so causing out of bounds write. Reworked to loop correctly using #define. Fixes: a124830a6f00 ("compress/qat: enable dynamic huffman encoding") Reported-by: Jerin Jacob <jerin.jacob@caviumnetworks.com> Signed-off-by: Fiona Trahe <fiona.trahe@intel.com> Tested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>