diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-30 02:06:04 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-30 02:06:04 +0000 |
commit | 88ca298efbb004600e1853cef872038f78843252 (patch) | |
tree | ce2251121ac51c204d6ab39eb871f12b067be10d /dln.c | |
parent | 4a29a3e90bbd123bca191961cb8223345b6d5bdf (diff) |
* dln.c (dln_find_1): fixed index overrun.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dln.c')
-rw-r--r-- | dln.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; } |