From 19fdb52aab9c4c89daffeb25ae20b0ad5a5e7661 Mon Sep 17 00:00:00 2001 From: Stas Degteff Date: Sun, 28 Mar 2010 17:20:21 +0000 Subject: [PATCH] Fix buffer overflow. Bugreport from Nick Voronin --- golded3/gealst.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/golded3/gealst.cpp b/golded3/gealst.cpp index 7e65a80..d9efce0 100644 --- a/golded3/gealst.cpp +++ b/golded3/gealst.cpp @@ -346,7 +346,7 @@ static bool AreaListCmp2(const Area* a, const Area* b) { void AreaList::Sort(const char* specs, int first, int last) { if(specs) - strcpy(sortspec, specs); + strxcpy(sortspec, specs, sizeof(sortspec)); else strcpy(sortspec, CFG->arealistsort); if(last == -1)