diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-28 23:55:34 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-28 23:55:34 +0000 |
commit | 51f9355bd6b3f81e7fbb3e7675f121ff2a99c530 (patch) | |
tree | c95229365804cbf61db771578a521a99a4502b2d /eval.c | |
parent | 5093a9eff1ba5610daefdb18a0f455f0222acccf (diff) |
* eval.c (rb_feature_p): fix possible buffer overrun.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -6984,7 +6984,7 @@ rb_feature_p(feature, ext, rb) if (ext && *ext) return 0; buf = ALLOCA_N(char, len + DLEXT_MAXLEN + 1); - strcpy(buf, feature); + MEMCPY(buf, feature, char, len); for (i = 0; (e = loadable_ext[i]) != 0; i++) { strncpy(buf + len, e, DLEXT_MAXLEN + 1); if (st_lookup(loading_tbl, (st_data_t)buf, 0)) { |