[Patches] [ python-Patches-756032 ] re reads an uninitialized memory
SourceForge.net
noreply@sourceforge.net
Sat, 21 Jun 2003 16:28:45 -0700
Patches item #756032, was opened at 2003-06-17 16:53
Message generated for change (Comment added) made by niemeyer
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=756032&group_id=5470
Category: Modules
Group: None
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: atsuo ishimoto (ishimoto)
Assigned to: Gustavo Niemeyer (niemeyer)
Summary: re reads an uninitialized memory
Initial Comment:
With this script, re reads from an address beyond the
end of the string.
>>> import re
>>> r = re.compile(r"\b1")
>>> print r.search('a', 1)
See assert() in the attached patch to see where
incorrect memory reading occurs.
This patch looks fix the problem, but I'm not sure this is
correct answer.
----------------------------------------------------------------------
>Comment By: Gustavo Niemeyer (niemeyer)
Date: 2003-06-21 23:28
Message:
Logged In: YES
user_id=7887
Atsuo, can you please describe what problem you're trying to
fix!? In other words, can you provide some code which breaks
SRE?
Your assertion doesn't seem to make sense in this place,
since having ptr outside the boundaries of beginning/end
*is* accepted. Notice how "ptr < state->end" is checked
before using ptr[0].
I'm closing this bug as invalid. If you have something you
belive to prove there's a bug in this place, please reopen
this bug.
Thank you very much for taking the time to fill this bug.
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2003-06-21 13:30
Message:
Logged In: YES
user_id=21627
Gustavo, can your review this code?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=756032&group_id=5470