From bf451dbba4e96c2ad0f5cb9d8684edd9e982a859 Mon Sep 17 00:00:00 2001 From: usa Date: Tue, 16 Dec 2008 02:41:23 +0000 Subject: [PATCH] * dln.c (dln_load): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 2 ++ dln.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 95a6d4f46c..e45a6138bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ Tue Dec 16 11:37:07 2008 NAKAMURA Usaku * load.c (rb_feature_p): ditto. + * dln.c (dln_load): ditto. + Tue Dec 16 09:14:28 2008 Yukihiro Matsumoto * parse.y (block_call): block should not be given to yield. diff --git a/dln.c b/dln.c index 69f44a7add..bb64c52a0f 100644 --- a/dln.c +++ b/dln.c @@ -1433,8 +1433,8 @@ dln_load(const char *file) if (err_stat != B_NO_ERROR) { char real_name[MAXPATHLEN]; - strcpy(real_name, buf); - strcat(real_name, "__Fv"); + strlcpy(real_name, buf, MAXPATHLEN); + strlcat(real_name, "__Fv", MAXPATHLEN); err_stat = get_image_symbol(img_id, real_name, B_SYMBOL_TYPE_TEXT, (void **)&init_fct); }