Fix buffer overflow. Bugreport from Nick Voronin
This commit is contained in:
parent
9f7400b7aa
commit
19fdb52aab
@ -346,7 +346,7 @@ static bool AreaListCmp2(const Area* a, const Area* b) {
|
|||||||
void AreaList::Sort(const char* specs, int first, int last) {
|
void AreaList::Sort(const char* specs, int first, int last) {
|
||||||
|
|
||||||
if(specs)
|
if(specs)
|
||||||
strcpy(sortspec, specs);
|
strxcpy(sortspec, specs, sizeof(sortspec));
|
||||||
else
|
else
|
||||||
strcpy(sortspec, CFG->arealistsort);
|
strcpy(sortspec, CFG->arealistsort);
|
||||||
if(last == -1)
|
if(last == -1)
|
||||||
|
Reference in New Issue
Block a user