diff options
| author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-16 02:37:45 +0000 |
|---|---|---|
| committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-16 02:37:45 +0000 |
| commit | 3deb2793cac0b6f9f8483994bdc6cf5f6ea5c394 (patch) | |
| tree | 9f770332e0e729915f28175c1d53be2136e31032 /load.c | |
| parent | 622e0fcc9a05b67f2d3e150f1bb92993c482e587 (diff) | |
| download | ruby-3deb2793cac0b6f9f8483994bdc6cf5f6ea5c394.tar.gz ruby-3deb2793cac0b6f9f8483994bdc6cf5f6ea5c394.tar.xz ruby-3deb2793cac0b6f9f8483994bdc6cf5f6ea5c394.zip | |
* ruby.c (set_arg0): use strlcpy() instead of strncpy().
* load.c (rb_feature_p): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'load.c')
| -rw-r--r-- | load.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |
