summaryrefslogtreecommitdiff
path: root/dln.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-07-19 08:31:04 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-07-19 08:31:04 +0000
commit20316027872b9a3a70babc884f838f499f1e5746 (patch)
treeffade6e5d1945bcecdd7236487b5f94a59b501a6 /dln.c
parent1fb55b9d7704c4e3df0118fe33890b65538dd06a (diff)
* signal.c (trap): remove sigexit(); handle "EXIT" via sig_exec().
[ruby-dev:26440] * io.c (rb_io_inspect): replace sprintf() with "%s" format all over the place by snprintf() to avoid integer overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dln.c')
-rw-r--r--dln.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/dln.c b/dln.c
index 4cb8f0a..6093b33 100644
--- a/dln.c
+++ b/dln.c
@@ -962,8 +962,9 @@ load_lib(lib)
dln_errno = DLN_EBADLIB;
if (lib[0] == '-' && lib[1] == 'l') {
- char *p = alloca(strlen(lib) + 4);
- sprintf(p, "lib%s.a", lib+2);
+ long len = strlen(lib) + 4;
+ char *p = alloca(len);
+ snprintf(p, len, "lib%s.a", lib+2);
lib = p;
}