From fcf15c482b582c4f2e5dd7c6222c4e3509bbb7d6 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Fri, 24 Oct 2008 20:07:00 +0000 Subject: Use strlcpy instead of strcpy in many places ticket: 6200 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20919 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/support/errors.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/util/support/errors.c') diff --git a/src/util/support/errors.c b/src/util/support/errors.c index cec10337f..b0c2ae013 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; -- cgit