summaryrefslogtreecommitdiffstats
path: root/src/util/support/errors.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/support/errors.c')
-rw-r--r--src/util/support/errors.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util/support/errors.c b/src/util/support/errors.c
index cec10337f5..b0c2ae0133 100644
--- a/src/util/support/errors.c
+++ b/src/util/support/errors.c
@@ -132,7 +132,8 @@ krb5int_get_error (struct errinfo *ep, long code)
if (code == ep->code && ep->msg) {
r = strdup(ep->msg);
if (r == NULL) {
- strcpy(ep->scratch_buf, _("Out of memory"));
+ strlcpy(ep->scratch_buf, _("Out of memory"),
+ sizeof(ep->scratch_buf));
r = ep->scratch_buf;
}
return r;