File: format-security.patch

package info (click to toggle)
abe 1.1%2Bdfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,064 kB
  • sloc: ansic: 5,468; sh: 2,725; objc: 224; makefile: 48
file content (24 lines) | stat: -rw-r--r-- 624 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From: Markus Koschany <apo@debian.org>
Date: Sat, 11 Jun 2016 11:53:59 +0200
Subject: format security

---
 src/Game.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Game.c b/src/Game.c
index 74002c7..8152309 100644
--- a/src/Game.c
+++ b/src/Game.c
@@ -19,9 +19,9 @@ path_sprintf(char *path, char *formatted_name, int version)
   len = strlen(path);
 
   if(1 == version) {
-    sprintf(path + len, formatted_name);
+    sprintf(path + len, "%s", formatted_name);
   } else {
-    sprintf(path + len, formatted_name, version);
+    sprintf(path + len, "%s", formatted_name, version);
   }
 
 }