From 05ef6deb26bf2d6c274101c02ce16299ceaa0ce2 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Thu, 29 Oct 2015 20:47:07 +0100 Subject: [PATCH] CID 22572: Copy into fixed size buffer (STRING_OVERFLOW) --- src/gmtool.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gmtool.c b/src/gmtool.c index dcdef8f45..5929eea0b 100644 --- a/src/gmtool.c +++ b/src/gmtool.c @@ -54,6 +54,7 @@ #include #include #include +#include #include #include @@ -1086,7 +1087,7 @@ static void handlekey(state * st, int c) else if (findmode == 'F') { faction *f = select_faction(st); if (f != NULL) { - strcpy(locate, itoa36(f->no)); + strlcpy(locate, itoa36(f->no), sizeof(locate)); findmode = 'f'; } else {