Skip to content

Commit 32eb0d1

Browse files
committed
* dln.c (dln_find_1): break if path list end, even for too long
path names. (ruby-bugs-ja:PR#412) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@3618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent df7c10d commit 32eb0d1

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Wed Mar 26 20:26:17 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
2+
3+
* dln.c (dln_find_1): break if path list end, even for too long
4+
path names. (ruby-bugs-ja:PR#412)
5+
16
Sun Mar 23 22:22:04 2003 WATANABE Hirofumi <eban@ruby-lang.org>
27

38
* lib/jcode.rb (tr!, delete!, szueeze!): add empty string checking.

dln.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1670,7 +1670,7 @@ dln_find_1(fname, path, exe_flag)
16701670
*bp = '\0';
16711671
fprintf(stderr, "\tDirectory \"%s\"\n", fbuf);
16721672
fprintf(stderr, "\tFile \"%s\"\n", fname);
1673-
continue;
1673+
goto next;
16741674
}
16751675
memcpy(bp, fname, i + 1);
16761676

@@ -1724,6 +1724,8 @@ dln_find_1(fname, path, exe_flag)
17241724
}
17251725
}
17261726
#endif /* MSDOS or NT or __human68k__ or __EMX__ */
1727+
1728+
next:
17271729
/* if not, and no other alternatives, life is bleak */
17281730
if (*ep == '\0') {
17291731
return NULL;

0 commit comments

Comments
 (0)