summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-30 02:06:04 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-30 02:06:04 +0000
commitca0ceb5c89823c9f5af97fc82d811a7294464169 (patch)
treece2251121ac51c204d6ab39eb871f12b067be10d
parent75fa99afd2f36e2a3373a628a3f7f959f1b463e2 (diff)
downloadruby-ca0ceb5c89823c9f5af97fc82d811a7294464169.tar.gz
ruby-ca0ceb5c89823c9f5af97fc82d811a7294464169.tar.xz
ruby-ca0ceb5c89823c9f5af97fc82d811a7294464169.zip
* dln.c (dln_find_1): fixed index overrun.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--dln.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 6849185ba..070513235 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Tue Jun 30 11:05:59 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * dln.c (dln_find_1): fixed index overrun.
+
Tue Jun 30 08:42:34 2009 Eric Hodel <drbrain@segment7.net>
* tool/instruby.rb: summary is required in a .gemspec.
diff --git a/dln.c b/dln.c
index 484dab5d1..b939dc346 100644
--- a/dln.c
+++ b/dln.c
@@ -1563,8 +1563,8 @@ dln_find_1(const char *fname, const char *path, char *fbuf, size_t size,
}
}
if (ext) {
- for (j = 0; STRCASECMP(ext, extension[j]); j++) {
- if (j == sizeof(extension) / sizeof(extension[0])) {
+ for (j = 0; STRCASECMP(ext, extension[j]); ) {
+ if (++j == sizeof(extension) / sizeof(extension[0])) {
ext = 0;
break;
}