diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-01-26 18:31:03 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-01-26 18:31:03 +0000 |
commit | ec458f636c4437524cf7536e41116ba245f29e11 (patch) | |
tree | c017b91c0d61e35b5e3a428b42c7708471eb6530 /error.c | |
parent | 2403d9188daf8bc6d753365bd84bc01ffeb515fd (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |