mirror of https://github.com/PCSX2/pcsx2.git
debugger: enforce a null terminated char of a C-string
CID 146728 (#1 of 1): Buffer not null terminated (BUFFER_SIZE_WARNING) buffer_size_warning: Calling strncpy with a maximum size argument of 128 bytes on destination array mod.name of size 128 bytes might leave the destination string unterminated
This commit is contained in:
parent
b082147c4d
commit
1baa6be6de
|
@ -241,6 +241,7 @@ void SymbolMap::AddModule(const char *name, u32 address, u32 size) {
|
||||||
|
|
||||||
ModuleEntry mod;
|
ModuleEntry mod;
|
||||||
strncpy(mod.name, name, ARRAY_SIZE(mod.name));
|
strncpy(mod.name, name, ARRAY_SIZE(mod.name));
|
||||||
|
mod.name[ARRAY_SIZE(mod.name) - 1] = 0;
|
||||||
mod.start = address;
|
mod.start = address;
|
||||||
mod.size = size;
|
mod.size = size;
|
||||||
mod.index = (int)modules.size() + 1;
|
mod.index = (int)modules.size() + 1;
|
||||||
|
|
Loading…
Reference in New Issue