From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lee Daly Subject: [PATCH] compress/isal: fixes offset check Date: Tue, 31 Jul 2018 12:08:36 +0100 Message-ID: <1533035316-63812-1-git-send-email-lee.daly@intel.com> Cc: dev@dpdk.org, Lee Daly To: pablo.de.lara.guarch@intel.com Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 74C8A2C5 for ; Tue, 31 Jul 2018 13:08:57 +0200 (CEST) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This commit fixes an offset check in decompression which was checking destination offset size against dst data_len rather than checking against dst pkt_len as required. Fixes:788e748d3845 ("compress/isal: support chained mbufs") Signed-off-by: Lee Daly --- drivers/compress/isal/isal_compress_pmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/compress/isal/isal_compress_pmd.c b/drivers/compress/isal/isal_compress_pmd.c index e75f48d..aef56e3 100644 --- a/drivers/compress/isal/isal_compress_pmd.c +++ b/drivers/compress/isal/isal_compress_pmd.c @@ -483,7 +483,7 @@ process_isal_inflate(struct rte_comp_op *op, struct isal_comp_qp *qp) return -1; } - if (op->dst.offset > op->m_dst->data_len) { + if (op->dst.offset > op->m_dst->pkt_len) { ISAL_PMD_LOG(ERR, "Output mbuf not big enough for length and " "offset provided.\n"); op->status = RTE_COMP_OP_STATUS_INVALID_ARGS; -- 2.7.4