From 249375ca94935126dabe334d247bf8237f3fa355 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Wed, 2 Mar 2022 07:38:03 +0100 Subject: [PATCH] - fix string format errors, rel 5 --- format-security.patch | 30 ++++++++++++++++++++++++++++++ liboping.spec | 4 +++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 format-security.patch diff --git a/format-security.patch b/format-security.patch new file mode 100644 index 0000000..db8c814 --- /dev/null +++ b/format-security.patch @@ -0,0 +1,30 @@ +--- liboping-1.10.0/src/oping.c~ 2017-05-11 09:32:27.000000000 +0200 ++++ liboping-1.10.0/src/oping.c 2022-03-02 07:37:25.601351158 +0100 +@@ -1125,7 +1125,7 @@ + wattron (ctx->window, COLOR_PAIR(color)); + + if (has_utf8()) +- mvwprintw (ctx->window, /* y = */ 3, /* x = */ x + 2, symbol); ++ mvwprintw (ctx->window, /* y = */ 3, /* x = */ x + 2, "%s", symbol); + else + mvwaddch (ctx->window, /* y = */ 3, /* x = */ x + 2, symbolc); + +@@ -1223,7 +1223,7 @@ + mvwaddch (ctx->window, /* y = */ 3, /* x = */ x + 2, ' '); + else if (has_utf8 ()) + mvwprintw (ctx->window, /* y = */ 3, /* x = */ x + 2, +- hist_symbols_utf8[index]); ++ "%s", hist_symbols_utf8[index]); + else + mvwaddch (ctx->window, /* y = */ 3, /* x = */ x + 2, + hist_symbols_acs[index] | A_ALTCHARSET); +@@ -1600,8 +1600,7 @@ + + HOST_PRINTF ("%zu bytes from %s (%s): icmp_seq=%u ttl=%i ", + data_len, context->host, context->addr, +- sequence, recv_ttl, +- format_qos (recv_qos, recv_qos_str, sizeof (recv_qos_str))); ++ sequence, recv_ttl); + if ((recv_qos != 0) || (opt_send_qos != 0)) + { + HOST_PRINTF ("qos=%s ", diff --git a/liboping.spec b/liboping.spec index 8759e16..203bb23 100644 --- a/liboping.spec +++ b/liboping.spec @@ -2,12 +2,13 @@ Summary: Liboping library to generate ICMP echo requests Summary(pl.UTF-8): Biblioteka liboping do generowania żądań ICMP echo Name: liboping Version: 1.10.0 -Release: 4 +Release: 5 License: LGPL v2.1+ (library), GPL v2+ (tool, perl binding) Group: Libraries Source0: http://noping.cc/files/%{name}-%{version}.tar.bz2 # Source0-md5: 54e0f5a1aaf9eabf3f412d2fdc9c6831 Patch0: gcc8.patch +Patch1: format-security.patch URL: http://noping.cc/ BuildRequires: autoconf >= 2.65 BuildRequires: automake @@ -118,6 +119,7 @@ jeden. %prep %setup -q %patch0 -p1 +%patch1 -p1 %build %{__libtoolize} -- 2.44.0