From 149e1593e92eb3d11a1f53cc524eafaf94fcb50c Mon Sep 17 00:00:00 2001 From: yugui Date: Sun, 12 Jul 2009 14:45:12 +0000 Subject: merges r23906 from trunk into ruby_1_9_1. -- * dln.c (dln_find_1): fixed index overrun. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- dln.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dln.c') diff --git a/dln.c b/dln.c index 23df91aaa4..8826e94c5f 100644 --- a/dln.c +++ b/dln.c @@ -1564,8 +1564,8 @@ dln_find_1(const char *fname, const char *path, char *fbuf, int 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; } -- cgit v1.2.3