aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-multimedia/libcdio/libcdio/0001-Fix-a-few-Werror-format-security-errors-with-mvprint.patch
blob: 09e7dc3dfb9eb7d444b8f629335b61d7ed9fb714 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From e5e54be286bf6d8336b747503c803750bc674c57 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 30 Oct 2021 01:28:18 -0700
Subject: [PATCH] Fix a few -Werror=format-security errors with mvprintw()

In all these places a non-constant is used as a format string which
compiler complains about. Fix by using "%s" as format.

Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 src/cdda-player.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/cdda-player.c b/src/cdda-player.c
index 69eddee..8834d60 100644
--- a/src/cdda-player.c
+++ b/src/cdda-player.c
@@ -298,7 +298,7 @@ action(const char *psz_action)
              psz_action);
   else
     snprintf(psz_action_line, sizeof(psz_action_line), "%s", "" );
-  mvprintw(LINE_ACTION, 0, psz_action_line);
+  mvprintw(LINE_ACTION, 0, "%s", psz_action_line);
   clrtoeol();
   refresh();
 }
@@ -1029,10 +1029,10 @@ display_tracks(void)
       }
       if (sub.track == i) {
         attron(A_STANDOUT);
-        mvprintw(i_line++, 0, line);
+        mvprintw(i_line++, 0, "%s", line);
         attroff(A_STANDOUT);
       } else
-        mvprintw(i_line++, 0, line);
+        mvprintw(i_line++, 0, "%s", line);
       clrtoeol();
     }
   }