summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-01-26 18:31:03 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-01-26 18:31:03 +0000
commitec458f636c4437524cf7536e41116ba245f29e11 (patch)
treec017b91c0d61e35b5e3a428b42c7708471eb6530 /error.c
parent2403d9188daf8bc6d753365bd84bc01ffeb515fd (diff)
* error.c (get_syserror): use snprintf() instead of sprintf(). pointed
out by knu. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'error.c')
-rw-r--r--error.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/error.c b/error.c
index 272390139c..fc4e08ff07 100644
--- a/error.c
+++ b/error.c
@@ -497,7 +497,7 @@ get_syserr(int n)
if (!st_lookup(syserr_tbl, n, &error)) {
char name[8]; /* some Windows' errno have 5 digits. */
- sprintf(name, "E%03d", n);
+ snprintf(name, sizeof(name), "E%03d", n);
error = set_syserr(n, name);
}
return error;