[Debian-ha-commits] [booth] 01/12: Fix GCC-7 warning on buffer size (Closes: #853337)

Valentin Vidic vvidic-guest at moszumanska.debian.org
Tue Jun 27 12:17:12 UTC 2017


This is an automated email from the git hooks/post-receive script.

vvidic-guest pushed a commit to branch master
in repository booth.

commit c5cb22adb9527327317796ae77f799b4cfca895a
Author: Valentin Vidic <Valentin.Vidic at CARNet.hr>
Date:   Tue Jun 27 08:51:13 2017 +0200

    Fix GCC-7 warning on buffer size (Closes: #853337)
---
 debian/patches/gcc-7-buffer-size.patch | 26 ++++++++++++++++++++++++++
 debian/patches/series                  |  1 +
 2 files changed, 27 insertions(+)

diff --git a/debian/patches/gcc-7-buffer-size.patch b/debian/patches/gcc-7-buffer-size.patch
new file mode 100644
index 0000000..32ebc7d
--- /dev/null
+++ b/debian/patches/gcc-7-buffer-size.patch
@@ -0,0 +1,26 @@
+From: Valentin Vidic <Valentin.Vidic at CARNet.hr>
+Bug: https://github.com/ClusterLabs/booth/pull/59
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=853337
+Subject: Fix GCC-7 warning on buffer size
+    
+    ticket.c: In function ‘process_tickets’:
+    ticket.c:470:44: warning: ‘%s’ directive output may be truncated writing up to 63 bytes into a region of size 53 [-Wformat-truncation=]
+       snprintf(buff, sizeof(buff), "granted to %s",
+                                                ^~
+    ticket.c:470:3: note: ‘snprintf’ output between 12 and 75 bytes into a destination of size 64
+       snprintf(buff, sizeof(buff), "granted to %s",
+       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+        site_string(tk->leader));
+        ~~~~~~~~~~~~~~~~~~~~~~~~
+
+--- a/src/ticket.c
++++ b/src/ticket.c
+@@ -508,7 +508,7 @@
+ {
+ 	int valid;
+ 	const char *where_granted = "\0";
+-	char buff[64];
++	char buff[75];
+ 
+ 	valid = is_time_set(&tk->term_expires) && !is_past(&tk->term_expires);
+ 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..9866e9a
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+gcc-7-buffer-size.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-ha/booth.git



More information about the Debian-HA-Commits mailing list