diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-15 06:03:02 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-15 06:03:02 +0000 |
commit | 36f6ce40832a8c19301898ff20c370d5d4638923 (patch) | |
tree | a1bbc33aa499bc1092e2f0770bb9d801332d7c86 /file.c | |
parent | 65fcaf4113e5e9855e98c3f483f34e1bfe077203 (diff) | |
download | ruby-36f6ce40832a8c19301898ff20c370d5d4638923.tar.gz |
* file.c (ruby_enc_find_basename): allow NULL as alllen.
[ruby-dev:45363][Bug #6146]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3563,7 +3563,7 @@ ruby_enc_find_basename(const char *name, long *baselen, long *alllen, rb_encodin #endif long f = 0, n = -1; - end = name + *alllen; + end = name + (alllen ? (size_t)*alllen : strlen(name)); name = skipprefix(name, end, enc); #if defined DOSISH_DRIVE_LETTER || defined DOSISH_UNC root = name; |