summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2008-06-07 15:49:27 +0000
committermiod <miod@openbsd.org>2008-06-07 15:49:27 +0000
commitc404a2006c955289d4e7aa31e6e6f26d6da180a3 (patch)
tree5af1b73118ac39d2bc8e18eb759e0431d477d635
parentPut back the diff made between rev. 1.1.1.3 and 1.3 (diff)
downloadwireguard-openbsd-c404a2006c955289d4e7aa31e6e6f26d6da180a3.tar.xz
wireguard-openbsd-c404a2006c955289d4e7aa31e6e6f26d6da180a3.zip
Put back sprintf -> snprintf changes which have been lost accidentally in the
last update.
-rw-r--r--gnu/lib/libiberty/src/strerror.c4
-rw-r--r--gnu/lib/libiberty/src/strsignal.c4
-rw-r--r--gnu/lib/libiberty/src/xstrerror.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/gnu/lib/libiberty/src/strerror.c b/gnu/lib/libiberty/src/strerror.c
index 0efadc3d65e..091ee9cf365 100644
--- a/gnu/lib/libiberty/src/strerror.c
+++ b/gnu/lib/libiberty/src/strerror.c
@@ -650,7 +650,7 @@ strerror (int errnoval)
else if ((sys_errlist == NULL) || (sys_errlist[errnoval] == NULL))
{
/* In range, but no sys_errlist or no entry at this index. */
- sprintf (buf, "Error %d", errnoval);
+ snprintf (buf, sizeof buf, "Error %d", errnoval);
msg = buf;
}
else
@@ -712,7 +712,7 @@ strerrno (int errnoval)
else if ((error_names == NULL) || (error_names[errnoval] == NULL))
{
/* In range, but no error_names or no entry at this index. */
- sprintf (buf, "Error %d", errnoval);
+ snprintf (buf, sizeof buf, "Error %d", errnoval);
name = (const char *) buf;
}
else
diff --git a/gnu/lib/libiberty/src/strsignal.c b/gnu/lib/libiberty/src/strsignal.c
index c3a16ab9bdc..f840e910cfb 100644
--- a/gnu/lib/libiberty/src/strsignal.c
+++ b/gnu/lib/libiberty/src/strsignal.c
@@ -427,7 +427,7 @@ strsignal (int signo)
else if ((sys_siglist == NULL) || (sys_siglist[signo] == NULL))
{
/* In range, but no sys_siglist or no entry at this index. */
- sprintf (buf, "Signal %d", signo);
+ snprintf (buf, sizeof buf, "Signal %d", signo);
msg = (const char *) buf;
}
else
@@ -482,7 +482,7 @@ strsigno (int signo)
else if ((signal_names == NULL) || (signal_names[signo] == NULL))
{
/* In range, but no signal_names or no entry at this index. */
- sprintf (buf, "Signal %d", signo);
+ snprintf (buf, sizeof buf, "Signal %d", signo);
name = (const char *) buf;
}
else
diff --git a/gnu/lib/libiberty/src/xstrerror.c b/gnu/lib/libiberty/src/xstrerror.c
index 2ea2200e9fc..95f28530008 100644
--- a/gnu/lib/libiberty/src/xstrerror.c
+++ b/gnu/lib/libiberty/src/xstrerror.c
@@ -72,7 +72,7 @@ xstrerror (int errnum)
/* If `errnum' is out of range, result might be NULL. We'll fix that. */
if (!errstr)
{
- sprintf (xstrerror_buf, ERRSTR_FMT, errnum);
+ snprintf (xstrerror_buf, sizeof xstrerror_buf, ERRSTR_FMT, errnum);
errstr = xstrerror_buf;
}
return errstr;