Bug #497
Ide/Browser: ParseItemNatural function with empty name
Status: | Approved | Start date: | 07/28/2013 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | Sender Ghost | % Done: | 0% | |
Category: | IDE | Spent time: | - | |
Target version: | - |
Description
The following excerpt from C/C++ source code leads to "Out of memory" panic message inside of ParseItemNatural function:
a :2:
But also applicable for //$ comment:
//$Id: Description 1234-12-12 12:34:56Z nickname $
History
#1 Updated by Sender Ghost about 11 years ago
- File 497a_uppsrc.diff added
- File 497b_uppsrc.diff added
- Status changed from New to Patch ready
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.
#2 Updated by Miroslav Fidler about 11 years ago
- Status changed from Patch ready to Approved
- Assignee changed from Miroslav Fidler to Sender Ghost
thanks!
#3 Updated by Sender Ghost about 11 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.
#4 Updated by Sender Ghost about 11 years ago
- Status changed from Approved to Patch ready
- Assignee changed from Sender Ghost to Miroslav Fidler
#5 Updated by Sender Ghost about 11 years ago
- Status changed from Patch ready to Approved
- Assignee changed from Miroslav Fidler to Sender Ghost
r6218