diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | eval.c | 2 |
2 files changed, 4 insertions, 2 deletions
@@ -1,8 +1,10 @@ -Thu Mar 1 08:53:05 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> +Thu Mar 1 08:55:38 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> * eval.c (rb_feature_p): check loading_tbl if the given ext is empty. [ruby-dev:30452] + * eval.c (rb_feature_p): fix possible buffer overrun. + Thu Mar 1 03:30:21 2007 Akinori MUSHA <knu@iDaemons.org> * ext/digest/digest.c (get_digest_base_metadata): Allow inheriting @@ -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)) { |