Changeset 35601
- Timestamp:
- 08/06/08 05:46:40 (4 months ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 modified
-
ChangeLog (modified) (1 diff)
-
platform/text/RegularExpression.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r35599 r35601 1 2008-08-06 Marco Barisione <marco.barisione@collabora.co.uk> 2 3 Reviewed by Eric Seidel. 4 5 http://bugs.webkit.org/show_bug.cgi?id=20295 6 RegularExpression::match should not crash when a null string is passed 7 8 RegularExpression::match used to pass null subject strings to 9 jsRegExpExecute causing an ASSERT failure and then a crash. 10 There is no need to fix also RegularExpression:search and 11 RegularExpression::searchRev as they just call 12 RegularExpression::match. 13 14 * platform/text/RegularExpression.cpp: 15 (WebCore::RegularExpression::match): Return -1 if the string is null. 16 1 17 2008-08-06 Jan Michael Alonzo <jmalonzo@webkit.org> 2 18 -
trunk/WebCore/platform/text/RegularExpression.cpp
r34366 r35601 1 1 /* 2 2 * Copyright (C) 2004, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2008 Collabora Ltd. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 130 131 int RegularExpression::match(const String& str, int startFrom, int* matchLength) const 131 132 { 133 if (str.isNull()) 134 return -1; 135 132 136 d->lastMatchString = str; 133 137 // First 2 offsets are start and end offsets; 3rd entry is used internally by pcre