WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
20295
RegularExpression::match should not crash when a null string is passed
https://bugs.webkit.org/show_bug.cgi?id=20295
Summary
RegularExpression::match should not crash when a null string is passed
Marco Barisione
Reported
2008-08-06 03:44:21 PDT
RegularExpression::match() passes a null subject string to jsRegExpExecute causing a crash. See also
bug #19794
for a discussion on this.
Attachments
Check for null strings
(1.78 KB, patch)
2008-08-06 03:54 PDT
,
Marco Barisione
eric
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Marco Barisione
Comment 1
2008-08-06 03:54:59 PDT
Created
attachment 22675
[details]
Check for null strings
Eric Seidel (no email)
Comment 2
2008-08-06 05:22:20 PDT
Comment on
attachment 22675
[details]
Check for null strings I found the text "... with the null string." a bit confusing. I think that last clause could be removed. Looks great!
Jan Alonzo
Comment 3
2008-08-06 05:47:17 PDT
Removed the last clause before landing. Landed in
r35601
mitz
Comment 4
2008-08-06 07:30:01 PDT
How was this being hit? Is it possible to make a test case? In previous occurrences of this crash, the fix was applied at the call site.
Marco Barisione
Comment 5
2008-08-06 07:40:58 PDT
(In reply to
comment #4
)
> How was this being hit? Is it possible to make a test case? In previous > occurrences of this crash, the fix was applied at the call site.
RegularExpression::match is called by DOMImplementation::isXMLMIMEType. Of course the mime type should not be null, this is why I'm also proposing to commit patch #22023 to the CURL backend but IMHO it's a good idea to protect RegularExpression::match from crashing. If you think that this is not the best idea we could just throw away this patch or I could write a patch to check for null mime types in DOMImplementation::isXMLMIMEType.
Alp Toker
Comment 6
2008-08-08 01:30:28 PDT
Does a two-line null check need a whole new copyright entry?
Marco Barisione
Comment 7
2008-08-08 02:32:24 PDT
(In reply to
comment #6
)
> Does a two-line null check need a whole new copyright entry?
Actually no, I just did that out of habit.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug