Hello community,

here is the log from the commit of package wget2 for openSUSE:Factory checked 
in at 2020-04-14 15:12:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/wget2 (Old)
 and      /work/SRC/openSUSE:Factory/.wget2.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "wget2"

Tue Apr 14 15:12:11 2020 rev:2 rq:793872 version:1.99.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/wget2/wget2.changes      2019-09-09 
12:34:30.165480983 +0200
+++ /work/SRC/openSUSE:Factory/.wget2.new.2738/wget2.changes    2020-04-14 
15:19:39.568675669 +0200
@@ -1,0 +2,6 @@
+Tue Apr 14 11:47:51 UTC 2020 - Andreas Schwab <sch...@suse.de>
+
+- test-dl.patch, test-buffer-printf.patch: Fix undefined behviour in
+  testsuite
+
+-------------------------------------------------------------------

New:
----
  test-buffer-printf.patch
  test-dl.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ wget2.spec ++++++
--- /var/tmp/diff_new_pack.GHT9vV/_old  2020-04-14 15:19:40.020676132 +0200
+++ /var/tmp/diff_new_pack.GHT9vV/_new  2020-04-14 15:19:40.028676141 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package wget2
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,7 +12,7 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
@@ -20,11 +20,13 @@
 Version:        1.99.2
 Release:        0
 Summary:        A Tool for Mirroring FTP and HTTP Servers
-License:        GPL-3.0+ and LGPL-3.0+
+License:        GPL-3.0-or-later AND LGPL-3.0-or-later
 Group:          Productivity/Networking/Web/Utilities
 URL:            https://www.gnu.org/software/wget/
 
 Source:         https://ftp.gnu.org/gnu/wget/%name-%version.tar.gz
+Patch1:         test-dl.patch
+Patch2:         test-buffer-printf.patch
 BuildRequires:  doxygen
 BuildRequires:  flex
 BuildRequires:  gettext-devel >= 0.18.1
@@ -32,15 +34,15 @@
 BuildRequires:  libtool >= 2.2
 BuildRequires:  libunistring-devel
 BuildRequires:  pkg-config
-BuildRequires:  pkgconfig(libbrotlidec)
 BuildRequires:  pkgconfig(bzip2)
 BuildRequires:  pkgconfig(gnutls)
+BuildRequires:  pkgconfig(libbrotlidec)
 BuildRequires:  pkgconfig(liblzma)
-BuildRequires:  pkgconfig(libpcre2-8)
 BuildRequires:  pkgconfig(libnghttp2)
-BuildRequires:  pkgconfig(zlib)
-BuildRequires:  pkgconfig(libzstd)
+BuildRequires:  pkgconfig(libpcre2-8)
 BuildRequires:  pkgconfig(libpsl)
+BuildRequires:  pkgconfig(libzstd)
+BuildRequires:  pkgconfig(zlib)
 
 %description
 Wget enables you to retrieve WWW documents or FTP files from a
@@ -53,7 +55,7 @@
 
 %package -n libwget0
 Summary:        A library to download and mirror FTP/HTTP sites
-License:        LGPL-3.0+
+License:        LGPL-3.0-or-later
 Group:          System/Libraries
 
 %description -n libwget0
@@ -65,7 +67,7 @@
 
 %package -n libwget-devel
 Summary:        Development files for libwget
-License:        LGPL-3.0+
+License:        LGPL-3.0-or-later
 Group:          Development/Libraries/C and C++
 
 %description -n libwget-devel

++++++ test-buffer-printf.patch ++++++
>From beb557ea8474f93b2a2e43f5e2e01a4b7c55ce88 Mon Sep 17 00:00:00 2001
From: Andreas Schwab <sch...@suse.de>
Date: Sat, 11 Apr 2020 22:05:04 +0200
Subject: [PATCH] Fix undefined behaviour in test_buffer_printf

* unit-tests/test.c (test_buffer_printf): Cast argument to printf
function to correct type.
---
 unit-tests/test.c | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/unit-tests/test.c b/unit-tests/test.c
index f19b41de..5c1209c6 100644
--- a/unit-tests/test.c
+++ b/unit-tests/test.c
@@ -314,6 +314,8 @@ static void test_buffer_printf(void)
        static const char *left_adjust[] = { "", "-" };
        static const long long number[] = { 0, 1LL, -1LL, 10LL, -10LL, 
18446744073709551615ULL };
        static const char *modifier[] = { "", "h", "hh", "l", "ll", "z" }; // 
%L... won't work on OpenBSD5.0
+       enum argtype { type_int, type_long, type_long_long, type_size_t };
+       static const enum argtype modifier_type[] = { type_int, type_int, 
type_int, type_long, type_long_long, type_size_t };
        static const char *conversion[] = { "d", "i", "u", "o", "x", "X" };
        char fmt[32], result[64], string[32];
        size_t z, a, it, n, c, m;
@@ -464,8 +466,26 @@ integer_tests:
                                                        #pragma GCC diagnostic 
push
                                                        #pragma GCC diagnostic 
ignored "-Wformat-nonliteral"
 #endif
-                                                       snprintf(result, 
sizeof(result), fmt, number[n]);
-                                                       
wget_buffer_printf(&buf, fmt, number[n]);
+                                                       switch 
(modifier_type[m]) {
+                                                       case type_int:
+                                                               
snprintf(result, sizeof(result), fmt, (int)number[n]);
+                                                               
wget_buffer_printf(&buf, fmt, (int)number[n]);
+                                                               break;
+                                                       case type_long:
+                                                               
snprintf(result, sizeof(result), fmt, (long)number[n]);
+                                                               
wget_buffer_printf(&buf, fmt, (long)number[n]);
+                                                               break;
+                                                       case type_long_long:
+                                                               
snprintf(result, sizeof(result), fmt, (long long)number[n]);
+                                                               
wget_buffer_printf(&buf, fmt, (long long)number[n]);
+                                                               break;
+                                                       case type_size_t:
+                                                               
snprintf(result, sizeof(result), fmt, (size_t)number[n]);
+                                                               
wget_buffer_printf(&buf, fmt, (size_t)number[n]);
+                                                               break;
+                                                       default:
+                                                               abort();
+                                                       }
 #if defined __clang__ || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
                                                        #pragma GCC diagnostic 
pop
 #endif
-- 
2.26.0

++++++ test-dl.patch ++++++
>From baf385f48d4703282e84e405b9097316cf4f4b94 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tim=20R=C3=BChsen?= <tim.rueh...@gmx.de>
Date: Sun, 22 Sep 2019 19:39:44 +0200
Subject: [PATCH] * unit-tests/test-dl.c: Add missing len param to plugin
 function call

---
 unit-tests/test-dl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/unit-tests/test-dl.c b/unit-tests/test-dl.c
index c1ea51fe..41086019 100644
--- a/unit-tests/test-dl.c
+++ b/unit-tests/test-dl.c
@@ -178,13 +178,13 @@ do { \
        } \
 } while(0)
 
-typedef void (*test_fn)(char buf[16]);
+typedef void (*test_fn)(char buf[16], size_t len);
 static void test_fn_check(void *fn, const char *expected)
 {
        char buf[16];
        test_fn fn_p;
        *((void **) &fn_p) = fn;
-       (*fn_p)(buf);
+       (*fn_p)(buf, sizeof(buf));
        if (strncmp(buf, expected, 15) != 0)
                abortmsg("Test function returned %s, expected %s", buf, 
expected);
 }
-- 
2.26.0


Reply via email to