1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
nobu 2003-03-26 11:27:00 +00:00
parent df7c10d5d2
commit 32eb0d1998
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Wed Mar 26 20:26:17 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* dln.c (dln_find_1): break if path list end, even for too long
path names. (ruby-bugs-ja:PR#412)
Sun Mar 23 22:22:04 2003 WATANABE Hirofumi <eban@ruby-lang.org>
* lib/jcode.rb (tr!, delete!, szueeze!): add empty string checking.

4
dln.c
View file

@ -1670,7 +1670,7 @@ dln_find_1(fname, path, exe_flag)
*bp = '\0';
fprintf(stderr, "\tDirectory \"%s\"\n", fbuf);
fprintf(stderr, "\tFile \"%s\"\n", fname);
continue;
goto next;
}
memcpy(bp, fname, i + 1);
@ -1724,6 +1724,8 @@ dln_find_1(fname, path, exe_flag)
}
}
#endif /* MSDOS or NT or __human68k__ or __EMX__ */
next:
/* if not, and no other alternatives, life is bleak */
if (*ep == '\0') {
return NULL;