summaryrefslogtreecommitdiff
path: root/load.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-16 02:37:45 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-16 02:37:45 +0000
commit6a613ba2e4f23b736934b48803bfc0288edace1b (patch)
tree9f770332e0e729915f28175c1d53be2136e31032 /load.c
parent587afe728b55eacb8ed8dbf8db2f092625f18063 (diff)
* ruby.c (set_arg0): use strlcpy() instead of strncpy().
* load.c (rb_feature_p): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'load.c')
-rw-r--r--load.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/load.c b/load.c
index 4166d9cd26..efe130c4f6 100644
--- a/load.c
+++ b/load.c
@@ -193,7 +193,7 @@ rb_feature_p(const char *feature, const char *ext, int rb, int expanded, const c
buf = RSTRING_PTR(bufstr);
MEMCPY(buf, feature, char, len);
for (i = 0; (e = loadable_ext[i]) != 0; i++) {
- strncpy(buf + len, e, DLEXT_MAXLEN + 1);
+ strlcpy(buf + len, e, DLEXT_MAXLEN + 1);
if (st_get_key(loading_tbl, (st_data_t)buf, &data)) {
rb_str_resize(bufstr, 0);
if (fn) *fn = (const char*)data;