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 | 8cafb2407cd547bc25afe5638af161928125d39d (patch) | |
| tree | c017b91c0d61e35b5e3a428b42c7708471eb6530 | |
| parent | e1d9d3692ade992892b674a0b7e862df39e7d167 (diff) | |
| download | ruby-8cafb2407cd547bc25afe5638af161928125d39d.tar.gz ruby-8cafb2407cd547bc25afe5638af161928125d39d.tar.xz ruby-8cafb2407cd547bc25afe5638af161928125d39d.zip | |
* error.c (get_syserror): use snprintf() instead of sprintf(). pointed
out by knu.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 10 | ||||
| -rw-r--r-- | error.c | 2 |
2 files changed, 9 insertions, 3 deletions
@@ -1,6 +1,12 @@ +Mon Jan 27 03:30:06 2003 NAKAMURA Usaku <usa@ruby-lang.org> + + * error.c (get_syserror): use snprintf() instead of sprintf(). pointed + out by knu. + Mon Jan 27 02:06:38 2003 NAKAMURA Usaku <usa@ruby-lang.org> - * error.c (get_syserror): some Windows' errno have 5 digits. + * error.c (get_syserror): some Windows' errno have 5 digits. pointed + out by znz. Sun Jan 26 19:23:10 2003 NAKAMURA Usaku <usa@ruby-lang.org> @@ -221,7 +227,7 @@ Sun Jan 19 23:08:18 2003 Akinori MUSHA <knu@iDaemons.org> Sun Jan 19 14:01:12 2003 UENO Katsuhiro <unnie@blue.sky.or.jp> - * regex.c (is_in_list): should work weill with UTF-8. + * regex.c (is_in_list): should work well with UTF-8. * regex.c (re_match_exec): ditto. @@ -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; |
