aboutsummaryrefslogtreecommitdiffstats
path: root/missing
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-26 09:28:48 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-26 09:28:48 +0000
commit3088ac0f6633d734eddf7e807a24e3ecf8bbc3e5 (patch)
tree764e96707c495559b8525109dd4d5901dffb70b2 /missing
parent9c530b2b3610b9a5092239c1672d783c8a4e74ab (diff)
downloadruby-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.c2
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;
}