summarylogtreecommitdiffstats
path: root/bufoverflow.patch
diff options
context:
space:
mode:
authorBrian Bidulock2018-05-15 15:07:45 -0600
committerBrian Bidulock2018-05-15 15:07:45 -0600
commit18723a2574cdf700085f6104419f89590b4cdeb0 (patch)
treea303c6da61b0beec3a45b8366119058bf68851ed /bufoverflow.patch
downloadaur-booth.tar.gz
initial version
Diffstat (limited to 'bufoverflow.patch')
-rw-r--r--bufoverflow.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/bufoverflow.patch b/bufoverflow.patch
new file mode 100644
index 000000000000..0deee65ca528
--- /dev/null
+++ b/bufoverflow.patch
@@ -0,0 +1,20 @@
+diff -up src/booth-1.0/src/ticket.c.orig src/booth-1.0/src/ticket.c
+--- src/booth-1.0/src/ticket.c.orig 2018-05-15 14:14:26.000000000 -0600
++++ src/booth-1.0/src/ticket.c 2018-05-15 14:15:31.000000000 -0600
+@@ -508,14 +508,14 @@ static void log_reacquire_reason(struct
+ {
+ int valid;
+ const char *where_granted = "\0";
+- char buff[64];
++ char buff[80];
+
+ valid = is_time_set(&tk->term_expires) && !is_past(&tk->term_expires);
+
+ if (tk->leader == local) {
+ where_granted = "granted here";
+ } else {
+- snprintf(buff, sizeof(buff), "granted to %s",
++ snprintf(buff, sizeof(buff) - 1, "granted to %s",
+ site_string(tk->leader));
+ where_granted = buff;
+ }