update version to 1.47
This commit is contained in:
parent
4ff34c008d
commit
5529250f18
@ -1,63 +0,0 @@
|
|||||||
From bfbefdf2d9aa12107d08d796d6fc78862ab85402 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Douglas Gilbert <dgilbert@interlog.com>
|
|
||||||
Date: Sun, 1 Aug 2021 03:14:05 +0000
|
|
||||||
Subject: [PATCH] sg_ses: fix crash when 'm LEN' < 252
|
|
||||||
|
|
||||||
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@907 6180dd3e-e324-4e3e-922d-17de1ae2f315
|
|
||||||
|
|
||||||
fix issue:https://gitee.com/src-openeuler/sg3_utils/issues/I5G05L
|
|
||||||
|
|
||||||
memset enc_stat_rsp by its true length
|
|
||||||
|
|
||||||
Signed-off-by: wangxiaomeng <wangxiaomeng@kylinos.cn>
|
|
||||||
---
|
|
||||||
src/sg_ses.c | 14 ++++++++------
|
|
||||||
1 file changed, 8 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/sg_ses.c b/src/sg_ses.c
|
|
||||||
index b9ac2e4..701359b 100644
|
|
||||||
--- a/src/sg_ses.c
|
|
||||||
+++ b/src/sg_ses.c
|
|
||||||
@@ -5530,7 +5530,7 @@ int
|
|
||||||
main(int argc, char * argv[])
|
|
||||||
{
|
|
||||||
bool have_cgs = false;
|
|
||||||
- int k, d_len, res, resid, vb;
|
|
||||||
+ int k, n, d_len, res, resid, vb;
|
|
||||||
int sg_fd = -1;
|
|
||||||
int pd_type = 0;
|
|
||||||
int ret = 0;
|
|
||||||
@@ -5764,15 +5764,17 @@ main(int argc, char * argv[])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
clear_scsi_pt_obj(ptvp);
|
|
||||||
- memset(enc_stat_rsp, 0, 4096);
|
|
||||||
+ memset(enc_stat_rsp, 0, enc_stat_rsp_sz);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (ptvp) {
|
|
||||||
- ret = sg_ll_request_sense_pt(ptvp, false, enc_stat_rsp,
|
|
||||||
- REQUEST_SENSE_RESP_SZ, ! op->quiet, vb);
|
|
||||||
+ n = (enc_stat_rsp_sz < REQUEST_SENSE_RESP_SZ) ? enc_stat_rsp_sz :
|
|
||||||
+ REQUEST_SENSE_RESP_SZ;
|
|
||||||
+ ret = sg_ll_request_sense_pt(ptvp, false, enc_stat_rsp, n,
|
|
||||||
+ ! op->quiet, vb);
|
|
||||||
if (0 == ret) {
|
|
||||||
- int sense_len = REQUEST_SENSE_RESP_SZ - get_scsi_pt_resid(ptvp);
|
|
||||||
+ int sense_len = n - get_scsi_pt_resid(ptvp);
|
|
||||||
struct sg_scsi_sense_hdr ssh;
|
|
||||||
|
|
||||||
if ((sense_len > 7) && sg_scsi_normalize_sense(enc_stat_rsp,
|
|
||||||
@@ -5801,7 +5803,7 @@ main(int argc, char * argv[])
|
|
||||||
" problems ahead\n", ret);
|
|
||||||
}
|
|
||||||
clear_scsi_pt_obj(ptvp);
|
|
||||||
- memset(enc_stat_rsp, 0, REQUEST_SENSE_RESP_SZ);
|
|
||||||
+ memset(enc_stat_rsp, 0, enc_stat_rsp_sz);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (op->nickname_str)
|
|
||||||
--
|
|
||||||
2.27.0
|
|
||||||
|
|
||||||
Binary file not shown.
BIN
sg3_utils-1.47.tar.xz
Normal file
BIN
sg3_utils-1.47.tar.xz
Normal file
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
Name: sg3_utils
|
Name: sg3_utils
|
||||||
Version: 1.46
|
Version: 1.47
|
||||||
Release: 6
|
Release: 1
|
||||||
Summary: Utilities that send SCSI commands to devices.
|
Summary: Utilities that send SCSI commands to devices.
|
||||||
License: GPL-2.0-or-later AND BSD
|
License: GPL-2.0-or-later AND BSD
|
||||||
URL: http://sg.danny.cz/sg/sg3_utils.html
|
URL: http://sg.danny.cz/sg/sg3_utils.html
|
||||||
@ -10,9 +10,8 @@ Patch0: 0000-sg3_utils-1.37-rescan-scsi-findremapped-enhance.patch
|
|||||||
Patch1: 0001-sg3_utils-1.37-rescan-downpress.patch
|
Patch1: 0001-sg3_utils-1.37-rescan-downpress.patch
|
||||||
Patch2: 0002-bugfix-sg3_utils-fix-syntax-error.patch
|
Patch2: 0002-bugfix-sg3_utils-fix-syntax-error.patch
|
||||||
Patch3: 0003-sg3_utils-1.42-delete-lun-rescan-scsi-bus-report-error.patch
|
Patch3: 0003-sg3_utils-1.42-delete-lun-rescan-scsi-bus-report-error.patch
|
||||||
Patch4: 0004-sg_ses-fix-crash-when-m-LEN-252.patch
|
Patch4: 0004-sg3_utils-rescan-scsi-bus-list-all-LUNs-in-one-line.patch
|
||||||
Patch5: 0005-sg3_utils-rescan-scsi-bus-list-all-LUNs-in-one-line.patch
|
Patch5: 0005-rescan-scsi-bus.sh-apply-fix-for-r-from-https-github.patch
|
||||||
Patch6: 0006-rescan-scsi-bus.sh-apply-fix-for-r-from-https-github.patch
|
|
||||||
|
|
||||||
Provides: %{name}-libs
|
Provides: %{name}-libs
|
||||||
Obsoletes: %{name}-libs
|
Obsoletes: %{name}-libs
|
||||||
@ -76,6 +75,9 @@ rm -rf $RPM_BUILD_ROOT/%{_libdir}/*.la
|
|||||||
%{_mandir}/man8/*
|
%{_mandir}/man8/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Aug 13 2022 volcanodragon <linfeilong@huawei.com> - 1.47-1
|
||||||
|
- update version to 1.47
|
||||||
|
|
||||||
* Mon Jul 11 2022 wangxiaomeng <wangxiaomeng@kylinos.cn> - 1.46-6
|
* Mon Jul 11 2022 wangxiaomeng <wangxiaomeng@kylinos.cn> - 1.46-6
|
||||||
- Backport patch to solve coredump problem, fix crash when 'm LEN' < 252
|
- Backport patch to solve coredump problem, fix crash when 'm LEN' < 252
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user