From 75ac0d61dd3bc1630dbb84295a19de7164b211c97d9cd3ca435c0cc3023b0873 Mon Sep 17 00:00:00 2001
From: Reinhard Max <max@suse.com>
Date: Thu, 19 May 2022 08:29:32 +0000
Subject: [PATCH] Accepting request 970919 from home:dirkmueller:Factory

- add expect-5.45-format-security.patch

OBS-URL: https://build.opensuse.org/request/show/970919
OBS-URL: https://build.opensuse.org/package/show/devel:languages:tcl/expect?expand=0&rev=32
---
 expect-5.45-format-security.patch | 13 +++++++++++++
 expect.changes                    |  5 +++++
 expect.spec                       |  9 +++------
 3 files changed, 21 insertions(+), 6 deletions(-)
 create mode 100644 expect-5.45-format-security.patch

diff --git a/expect-5.45-format-security.patch b/expect-5.45-format-security.patch
new file mode 100644
index 0000000..879f002
--- /dev/null
+++ b/expect-5.45-format-security.patch
@@ -0,0 +1,13 @@
+--- exp_clib.c.orig
++++ exp_clib.c
+@@ -1938,8 +1938,8 @@
+      char *str;
+ {
+   if (exp_is_debugging) {
+-    fprintf(stderr,str);
+-    if (exp_logfile) fprintf(exp_logfile,str);
++    fprintf(stderr, "%s", str);
++    if (exp_logfile) fprintf(exp_logfile, "%s", str);
+   }
+ }
+ 
diff --git a/expect.changes b/expect.changes
index f51baba..c633e0e 100644
--- a/expect.changes
+++ b/expect.changes
@@ -1,3 +1,8 @@
+-------------------------------------------------------------------
+Tue Apr 19 21:54:42 UTC 2022 - Dirk Müller <dmueller@suse.com>
+
+- add expect-5.45-format-security.patch 
+
 -------------------------------------------------------------------
 Tue Dec 21 15:41:30 UTC 2021 - Ludwig Nussel <lnussel@suse.de>
 
diff --git a/expect.spec b/expect.spec
index 2c2541f..a9e6e35 100644
--- a/expect.spec
+++ b/expect.spec
@@ -1,7 +1,7 @@
 #
 # spec file for package expect
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -30,6 +30,7 @@ Patch2:         expect-fixes.patch
 Patch3:         expect-log.patch
 Patch4:         config-guess-sub-update.patch
 Patch5:         expect-errorfd.patch
+Patch6:         expect-5.45-format-security.patch
 BuildRequires:  autoconf
 BuildRequires:  tcl-devel
 
@@ -54,11 +55,7 @@ expect package loaded.
 
 %prep
 %setup -q -n %name%version
-%patch1
-%patch2
-%patch3
-%patch4
-%patch5
+%autopatch -p0
 
 %build
 export CFLAGS="%{optflags} -fPIC -pie"