You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bcel-dev@jakarta.apache.org by bu...@apache.org on 2008/07/20 17:48:52 UTC
DO NOT REPLY [Bug 45440] New: Incorrect size calculation in
InstructionFinder
https://issues.apache.org/bugzilla/show_bug.cgi?id=45440
Summary: Incorrect size calculation in InstructionFinder
Product: BCEL
Version: 5.2
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: Main
AssignedTo: bcel-dev@jakarta.apache.org
ReportedBy: nebojsa.grujic@gmail.com
In InstructionFinder class, line 229 size of the matched pattern is calculated
as
int lenExpr = (endExpr - startExpr) + 1;
this is incorrect as endExpr is always given as one past the last index and
this function causes the iterator being returned to always have one more
instruction then requested. Also this can cause a crash if the pattern
requested is at the end of a search list as index goes out of bounds.
suggested fix (I have it working locally with no problems):
int lenExpr = (endExpr - startExpr);
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-dev-help@jakarta.apache.org
DO NOT REPLY [Bug 45440] Incorrect size calculation in
InstructionFinder
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45440
Torsten Curdt <tc...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #1 from Torsten Curdt <tc...@apache.org> 2010-01-10 13:14:16 UTC ---
Already fixed.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-dev-help@jakarta.apache.org