Skip to content

Commit e4cac77

Browse files
committed
merge revision(s) 16143:
* regex.c (re_search): string might be NULL. [ruby-core:16478] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 1efa5d3 commit e4cac77

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
Sun Jun 15 22:18:30 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
2+
3+
* regex.c (re_search): string might be NULL. [ruby-core:16478]
4+
15
Sun Jun 15 22:16:21 2008 NAKAMURA Usaku <usa@ruby-lang.org>
26

37
* time.c (rb_strftime): check errno to detect strftime(3)'s error.

regex.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3177,6 +3177,10 @@ re_search(bufp, string, size, startpos, range, regs)
31773177
/* Check for out-of-range starting position. */
31783178
if (startpos < 0 || startpos > size)
31793179
return -1;
3180+
if (!string) {
3181+
if (size == 0) string = "";
3182+
else return -1;
3183+
}
31803184

31813185
/* Update the fastmap now if not correct already. */
31823186
if (fastmap && !bufp->fastmap_accurate) {

version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define RUBY_RELEASE_DATE "2008-06-15"
33
#define RUBY_VERSION_CODE 186
44
#define RUBY_RELEASE_CODE 20080615
5-
#define RUBY_PATCHLEVEL 197
5+
#define RUBY_PATCHLEVEL 198
66

77
#define RUBY_VERSION_MAJOR 1
88
#define RUBY_VERSION_MINOR 8

0 commit comments

Comments
 (0)