From a1c5ab9de5f5336adf50a403fa478059213ff15e Mon Sep 17 00:00:00 2001 From: Stephen Kitt Date: Mon, 11 Oct 2021 14:33:14 +0200 Subject: [PATCH] Specify format string literals for all printw() calls Closes: #995597 --- debian/changelog | 8 +++++++ .../0018-Add-missing-format-strings.patch | 24 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 33 insertions(+) create mode 100644 debian/patches/0018-Add-missing-format-strings.patch diff --git a/debian/changelog b/debian/changelog index 34acb51..e50235c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +bsdgames (2.17-29) unstable; urgency=medium + + * Team upload. + * Specify format string literals for all printw() calls. + Closes: #995597. + + -- Stephen Kitt Mon, 11 Oct 2021 14:23:15 +0200 + bsdgames (2.17-28) unstable; urgency=medium * hack: Fix segv when 'i' (inventory) done after load from saved game. diff --git a/debian/patches/0018-Add-missing-format-strings.patch b/debian/patches/0018-Add-missing-format-strings.patch new file mode 100644 index 0000000..7cc742e --- /dev/null +++ b/debian/patches/0018-Add-missing-format-strings.patch @@ -0,0 +1,24 @@ +From: Stephen Kitt +Date: Mon, 11 Oct 2021 14:30:00 +0200 +Subject: Add missing format strings + +--- a/canfield/canfield/canfield.c ++++ b/canfield/canfield/canfield.c +@@ -1647,7 +1647,7 @@ + return; + clear(); + for (cp = basicinstructions; *cp != 0; cp++) +- printw(*cp); ++ printw("%s", *cp); + refresh(); + getch(); + clear(); +@@ -1660,7 +1660,7 @@ + return; + clear(); + for (cp = bettinginstructions; *cp != 0; cp++) +- printw(*cp); ++ printw("%s", *cp); + refresh(); + getch(); + } diff --git a/debian/patches/series b/debian/patches/series index 69c3c57..c257c17 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -15,3 +15,4 @@ 0015-primes-Update-to-NetBSD-CVS-2018-02-03.patch 0016-Better-explanation-how-to-read-the-documentation.patch 0017-hack-Fix-segv-when-i-inventory-done-after-load-from-.patch +0018-Add-missing-format-strings.patch