31 lines
967 B
Diff
31 lines
967 B
Diff
From 28af7936c6eebb6b18492cc128b905158fec56d9 Mon Sep 17 00:00:00 2001
|
|
From: Yang Shen <shenyang39@huawei.com>
|
|
Date: Mon, 20 Nov 2023 15:22:00 +0800
|
|
Subject: [PATCH 84/85] uadk: zlibwrapper - fix wrong request check
|
|
|
|
Add the check on req.status to show users invalid requests.
|
|
|
|
Signed-off-by: Yang Shen <shenyang39@huawei.com>
|
|
---
|
|
wd_zlibwrapper.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/wd_zlibwrapper.c b/wd_zlibwrapper.c
|
|
index 7189b7f..afa8ee7 100644
|
|
--- a/wd_zlibwrapper.c
|
|
+++ b/wd_zlibwrapper.c
|
|
@@ -236,8 +236,8 @@ static int wd_zlib_do_request(z_streamp strm, int flush, enum wd_comp_op_type ty
|
|
req.last = (flush == Z_FINISH) ? 1 : 0;
|
|
|
|
ret = wd_do_comp_strm(h_sess, &req);
|
|
- if (unlikely(ret)) {
|
|
- WD_ERR("failed to do compress(%d)!\n", ret);
|
|
+ if (unlikely(ret || req.status == WD_IN_EPARA)) {
|
|
+ WD_ERR("failed to do compress, ret = %d, req.status = %u!\n", ret, req.status);
|
|
return Z_STREAM_ERROR;
|
|
}
|
|
|
|
--
|
|
2.25.1
|
|
|