diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-26 09:28:48 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-26 09:28:48 +0000 |
commit | 3088ac0f6633d734eddf7e807a24e3ecf8bbc3e5 (patch) | |
tree | 764e96707c495559b8525109dd4d5901dffb70b2 /missing | |
parent | 9c530b2b3610b9a5092239c1672d783c8a4e74ab (diff) | |
download | ruby-3088ac0f6633d734eddf7e807a24e3ecf8bbc3e5.tar.gz |
get rid of sprintf
* missing/strerror.c (strerror): use snprintf instead of sprintf.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'missing')
-rw-r--r-- | missing/strerror.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/missing/strerror.c b/missing/strerror.c index 907b5aee0d..d3b61c3f12 100644 --- a/missing/strerror.c +++ b/missing/strerror.c @@ -13,6 +13,6 @@ strerror(int error) if (error <= sys_nerr && error > 0) { return sys_errlist[error]; } - sprintf(msg, "Unknown error (%d)", error); + snprintf(msg, sizeof(msg), "Unknown error (%d)", error); return msg; } |