Commit 60c3b2c6 authored by Ole Streicher's avatar Ole Streicher

Fix crash with fgwrite if compiled with "_FORTIFY_SOURCE=2"

parent 739bf699
......@@ -3,12 +3,12 @@ Date: Fri, 16 Feb 2018 14:08:41 +0100
Subject: Fix compilation
---
src/fgwrite.c | 2 ++
src/fgwrite.c | 4 +++-
src/kwdb.c | 7 ++++---
2 files changed, 6 insertions(+), 3 deletions(-)
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/fgwrite.c b/src/fgwrite.c
index 927e910..f06c853 100644
index 927e910..e3b4e4d 100644
--- a/src/fgwrite.c
+++ b/src/fgwrite.c
@@ -2,6 +2,8 @@
......@@ -20,6 +20,15 @@ index 927e910..f06c853 100644
#include <unistd.h>
#include <fcntl.h>
#include <time.h>
@@ -127,7 +129,7 @@ char *argv[];
static char *def_flist[1] = {NULL};
char *argp, **flist, *arg, *ip;
pointer kwdb, kwtoc;
- char card[256];
+ char card[SZ_PATHNAME];
char *sline;
int argno, ftype, i, ncards, level, phu;
diff --git a/src/kwdb.c b/src/kwdb.c
index aaeeefa..5952e52 100644
--- a/src/kwdb.c
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment