Fix a potential debug buffer overrun.

This commit is contained in:
Unknown W. Brackets 2015-01-17 11:56:44 -08:00
parent cf0e337b27
commit ff59cd6e11

View file

@ -788,7 +788,7 @@ void SymbolMap::SetLabelName(const char* name, u32 address) {
auto symbolKey = std::make_pair(labelInfo->second.module, labelInfo->second.addr);
auto label = labels.find(symbolKey);
if (label != labels.end()) {
strcpy(label->second.name,name);
strncpy(label->second.name, name, 128);
label->second.name[127] = 0;
// Refresh the active item if it exists.