summaryrefslogtreecommitdiff
path: root/missing
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-26 09:28:48 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-26 09:28:48 (GMT)
commit08cf4cecd5b32785e62f7cc06d0fb14b615a9101 (patch)
tree764e96707c495559b8525109dd4d5901dffb70b2 /missing
parent6d8574ade1c71d596b23b01f7cd0814bcc6698be (diff)
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 907b5ae..d3b61c3 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;
}