diff options
Diffstat (limited to 'src/config.cc')
| -rw-r--r-- | src/config.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/config.cc b/src/config.cc index 0be4eec..e3e3c85 100644 --- a/src/config.cc +++ b/src/config.cc @@ -128,10 +128,8 @@ void ReadConfig(void){ return; } - // TODO(fusion): If the following `readSymbol` calls `nextToken`, then the - // buffer the identifier is in will get wiped. (UPDATE: Yes, the original - // version copies it into a local stack buffer, lol.) - const char *Identifier = Script.readIdentifier(); + char Identifier[MAX_IDENT_LENGTH]; + strcpy(Identifier, Script.readIdentifier()); Script.readSymbol('='); // TODO(fusion): Ughh... Get rid of all `strcpy`s. A malicious configuration |
