Bug #497

Ide/Browser: ParseItemNatural function with empty name

Added by Sender Ghost over 10 years ago. Updated over 10 years ago.

Status:ApprovedStart date:07/28/2013
Priority:NormalDue date:
Assignee:Sender Ghost% Done:

0%

Category:IDESpent 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 $

497a_uppsrc.diff Magnifier - The diff file to apply for uppsrc directory (variant a) (887 Bytes) Sender Ghost, 07/28/2013 06:48 PM

497b_uppsrc.diff Magnifier - The diff file to apply for uppsrc directory (variant b) (1.14 KB) Sender Ghost, 07/28/2013 06:48 PM

497a_uppsrc2.diff Magnifier - Additional diff file to apply for uppsrc directory (for variant a) (590 Bytes) Sender Ghost, 07/30/2013 09:06 AM

History

#1 Updated by Sender Ghost over 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.

#2 Updated by Miroslav Fidler over 10 years ago

  • Status changed from Patch ready to Approved
  • Assignee changed from Miroslav Fidler to Sender Ghost

thanks!

#3 Updated by Sender Ghost over 10 years ago

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 over 10 years ago

  • Status changed from Approved to Patch ready
  • Assignee changed from Sender Ghost to Miroslav Fidler

#5 Updated by Sender Ghost over 10 years ago

  • Status changed from Patch ready to Approved
  • Assignee changed from Miroslav Fidler to Sender Ghost

r6218

Also available in: Atom PDF