From 66bac73470066dfffcb50b9c90c2aa14fe603cb9 Mon Sep 17 00:00:00 2001 From: yixiangzhike Date: Fri, 11 Oct 2024 11:01:53 +0800 Subject: [PATCH] Fix char overflow --- ...e-int-instead-of-char-for-variable-c.patch | 29 +++++++++++++++++++ cyrus-sasl.spec | 6 +++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 backport-Use-int-instead-of-char-for-variable-c.patch diff --git a/backport-Use-int-instead-of-char-for-variable-c.patch b/backport-Use-int-instead-of-char-for-variable-c.patch new file mode 100644 index 0000000..577ae39 --- /dev/null +++ b/backport-Use-int-instead-of-char-for-variable-c.patch @@ -0,0 +1,29 @@ +From 4013caeda28f67980df1bc8fcd95e80135d248e8 Mon Sep 17 00:00:00 2001 +From: yixiangzhike +Date: Mon, 16 Jan 2023 20:28:28 +0800 +Subject: [PATCH] Use int instead of char for variable c + +In some systems, char is compiled as unsigned char by default, +as a result, testsuite always fails in abnormal process. + +Signed-off-by: yixiangzhike +--- + utils/testsuite.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/utils/testsuite.c b/utils/testsuite.c +index 12da7f74..79e861d2 100644 +--- a/utils/testsuite.c ++++ b/utils/testsuite.c +@@ -2938,7 +2938,7 @@ void usage(void) + + int main(int argc, char **argv) + { +- char c; ++ int c; + int random_tests = -1; + int do_all = 0; + int skip_do_correct = 0; +-- +2.33.0 + diff --git a/cyrus-sasl.spec b/cyrus-sasl.spec index 611f793..5abce25 100644 --- a/cyrus-sasl.spec +++ b/cyrus-sasl.spec @@ -6,7 +6,7 @@ Name: cyrus-sasl Version: 2.1.27 -Release: 15 +Release: 16 Summary: The Cyrus SASL API Implementation License: BSD with advertising @@ -19,6 +19,7 @@ Patch0: 0003-Prevent-double-free-of-RC4-context.patch Patch1: fix-CVE-2019-19906.patch Patch2: backport-db_gdbm-fix-gdbm_errno-overlay-from-gdbm_close.patch Patch3: backport-CVE-2022-24407-Escape-password-for-SQL-insert-update.patch +Patch4: backport-Use-int-instead-of-char-for-variable-c.patch BuildRequires: autoconf, automake, libtool, gdbm-devel, groff BuildRequires: krb5-devel >= 1.2.2, openssl-devel, pam-devel, pkgconfig @@ -326,6 +327,9 @@ getent passwd %{username} >/dev/null || useradd -r -g %{username} -d %{homedir} %changelog +* Fri Oct 11 2024 yixiangzhike - 2.1.27-16 +- backport upstream patch to fix char overflow + * Fri Nov 24 2023 yixiangzhike - 2.1.27-15 - saslauthd always restart with 1s -- Gitee