summarylogtreecommitdiffstats
path: root/buffer-overflow.patch
diff options
context:
space:
mode:
Diffstat (limited to 'buffer-overflow.patch')
-rw-r--r--buffer-overflow.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/buffer-overflow.patch b/buffer-overflow.patch
new file mode 100644
index 000000000000..cc60be52fbed
--- /dev/null
+++ b/buffer-overflow.patch
@@ -0,0 +1,25 @@
+From: Steve Kemp <skx@debian.org>
+Date: Sat, 22 Mar 2014 16:04:16 +0100
+Subject: buffer overflow
+
+Bug: https://bugs.debian.org/203508
+Forwarded: no
+---
+ tuxpuck.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/tuxpuck.c b/tuxpuck.c
+index 4c0d6d7..76ecbb6 100644
+--- a/tuxpuck.c
++++ b/tuxpuck.c
+@@ -250,7 +250,9 @@ static void _tuxpuck_init(void)
+ _settings->mouse_speed = 5;
+ #ifndef windows
+ homeDir = getenv("HOME");
+- sprintf(_settings_file, "%s/.tuxpuckrc", homeDir);
++ /* Buffer overflow fixed!
++ * sprintf(_settings_file, "%s/.tuxpuckrc", homeDir); */
++ snprintf(_settings_file, sizeof(_settings_file)-1, "%s/.tuxpuckrc", homeDir);
+ #endif
+ _read_settings();
+ audio_set_mute(!_settings->sound);