Ide/Browser: ParseItemNatural function with empty name
|Assignee:||Sender Ghost||% Done:|
The following excerpt from C/C++ source code leads to "Out of memory" panic message inside of ParseItemNatural function:
But also applicable for //$ comment:
//$Id: Description 1234-12-12 12:34:56Z nickname $
#1 Updated by Sender Ghost about 10 years ago
I think, the cause with empty name might be related to C++ parser.
But anyway, the ParseItemNatural function is not guarded against empty name and some combination of ':' character (when n = 0 and Vector grows to memory limit inside of unlimited while loop). The simple fix is to check the length of the name variable, but also possible to reorganize creation of new Vector item to the moment, when final n value is known (e.g. near s += n, else ++s in case of n == 0).
Therefore, I created two different patches for ParseItemNatural function, which might be incomplete.
#3 Updated by Sender Ghost about 10 years ago
- File 497a_uppsrc2.diff added
I created additional patch (for variant a), which uses m.natural value length to show some text for Navigator bar, instead of just empty string.
This returns ability to show INITBLOCK, CONSOLE_APP_MAIN, GUI_APP_MAIN kind of defines for Navigator bar.