CID 22572: Copy into fixed size buffer (STRING_OVERFLOW)

This commit is contained in:
Enno Rehling 2015-10-29 20:47:07 +01:00
parent 4e431b41e2
commit 05ef6deb26
1 changed files with 2 additions and 1 deletions

View File

@ -54,6 +54,7 @@
#include <util/lists.h> #include <util/lists.h>
#include <util/rng.h> #include <util/rng.h>
#include <util/base36.h> #include <util/base36.h>
#include <util/bsdstring.h>
#include <storage.h> #include <storage.h>
#include <lua.h> #include <lua.h>
@ -1086,7 +1087,7 @@ static void handlekey(state * st, int c)
else if (findmode == 'F') { else if (findmode == 'F') {
faction *f = select_faction(st); faction *f = select_faction(st);
if (f != NULL) { if (f != NULL) {
strcpy(locate, itoa36(f->no)); strlcpy(locate, itoa36(f->no), sizeof(locate));
findmode = 'f'; findmode = 'f';
} }
else { else {