!8 fix hexencode test failed
From: @caodongxia Reviewed-by: @small_leek Signed-off-by: @small_leek
This commit is contained in:
commit
cb1d9489a7
@ -1,12 +0,0 @@
|
||||
diff -Nur a/common-src/Makefile.am b/common-src/Makefile.am
|
||||
--- a/common-src/Makefile.am 2017-12-01 21:26:28.000000000 +0800
|
||||
+++ b/common-src/Makefile.am 2022-06-20 11:30:35.792590848 +0800
|
||||
@@ -246,7 +246,7 @@
|
||||
# automake-style tests
|
||||
|
||||
TESTS = amflock-test event-test amsemaphore-test crc32-test quoting-test \
|
||||
- ipc-binary-test hexencode-test fileheader-test match-test
|
||||
+ ipc-binary-test fileheader-test match-test
|
||||
noinst_PROGRAMS = $(TESTS)
|
||||
|
||||
amflock_test_SOURCES = amflock-test.c
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
Name: amanda
|
||||
Version: 3.5.1
|
||||
Release: 20
|
||||
Release: 21
|
||||
Summary: A backup solution over network to disk
|
||||
License: BSD and GPLv3+ and GPLv2+ and GPLv2
|
||||
URL: http://www.amanda.org
|
||||
@ -25,7 +25,8 @@ Source16: kamanda@.service
|
||||
|
||||
Patch5: patch-tirpc
|
||||
Patch6: fix-multiple-definition.patch
|
||||
Patch7: Skip-hexencode-test-case-as-it-fails-with-new-glib2.patch
|
||||
#Refer: https://github.com/zmanda/amanda/pull/176/
|
||||
Patch7: fix-hexencode-test.patch
|
||||
|
||||
BuildRequires: automake autoconf libtool dump xfsdump cups
|
||||
BuildRequires: samba-client tar grep gcc-c++ readline-devel libtirpc-devel
|
||||
@ -195,6 +196,9 @@ make check
|
||||
%{_mandir}/man*
|
||||
|
||||
%changelog
|
||||
* Fri Nov 11 2022 caodongxia <caodongxia@h-partners.com> - 3.5.1-21
|
||||
- fix hexencode test failed
|
||||
|
||||
* Mon Jun 20 2022 liyanan <liyanan32@h-partners.com> - 3.5.1-20
|
||||
- Skip hexencode test case as it fails with new glib2
|
||||
|
||||
|
||||
27
fix-hexencode-test.patch
Normal file
27
fix-hexencode-test.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From 262c05b20c7de243542e7502e00152cdafb573d4 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Bieringer <pb@bieringer.de>
|
||||
Date: Wed, 6 Jul 2022 22:53:12 +0200
|
||||
Subject: [PATCH] fix for https://github.com/zmanda/amanda/issues/167
|
||||
|
||||
---
|
||||
common-src/amutil.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/common-src/amutil.c b/common-src/amutil.c
|
||||
index 20454ab73c..371d38e433 100644
|
||||
--- a/common-src/amutil.c
|
||||
+++ b/common-src/amutil.c
|
||||
@@ -1132,6 +1132,12 @@ char *hexdecode_string(const char *str, GError **err)
|
||||
new_len = orig_len = strlen(str);
|
||||
for (i = 0; i < orig_len; i++) {
|
||||
if (str[i] == '%') {
|
||||
+ if (new_len < 2) {
|
||||
+ g_set_error(err, am_util_error_quark(), AM_UTIL_ERROR_HEXDECODEINVAL,
|
||||
+ "Invalid hexcode string: %s", str);
|
||||
+ s = g_string_sized_new(0);
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
new_len -= 2;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user