summaryrefslogtreecommitdiff
path: root/dln.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-10 02:58:41 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-10 02:58:41 +0000
commit014f2164ed7031a1c31604b290d2ab0cf1deacdc (patch)
treef3907ca91e049d42dd7cc1f4bf9b63a8aef71514 /dln.c
parent6f4170c2a7787ab2d6b4b302a808391317bfcbf7 (diff)
2000-05-10
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dln.c')
-rw-r--r--dln.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/dln.c b/dln.c
index beef2f7..3a02dbf 100644
--- a/dln.c
+++ b/dln.c
@@ -1211,10 +1211,12 @@ dln_load(file)
{
#ifdef _WIN32
HINSTANCE handle;
- char winfile[255];
+ char winfile[MAXPATHLEN];
void (*init_fct)();
char buf[MAXPATHLEN];
+ if (strlen(file) >= MAXPATHLEN) rb_loaderror("filename too long");
+
/* Load the file as an object one */
init_funcname(buf, file);
@@ -1421,6 +1423,7 @@ dln_load(file)
if (err_stat != B_NO_ERROR) {
char real_name[MAXPATHLEN];
+
strcpy(real_name, buf);
strcat(real_name, "__Fv");
err_stat = get_image_symbol(img_id, real_name,