From: Derrick Brashear Date: Tue, 6 Mar 2001 21:42:07 +0000 (+0000) Subject: STABLE10-use-snprintf-for-krb-udp-error-packets-20010210 X-Git-Tag: openafs-stable-1_0_3~50 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=ef19c25f7f84f96775940dbe7a2521fda65c75cf;p=packages%2Fo%2Fopenafs.git STABLE10-use-snprintf-for-krb-udp-error-packets-20010210 (cherry picked from commit ba461fc17059946155f2413e3f7accc6964d9921) --- diff --git a/src/kauth/krb_udp.c b/src/kauth/krb_udp.c index 0d470a8c3..78c28d6b0 100644 --- a/src/kauth/krb_udp.c +++ b/src/kauth/krb_udp.c @@ -560,7 +560,7 @@ static err_packet (ksoc, pkt, code, reason) if (reason == 0) reason = ""; else if (strlen(reason) + 20 > sizeof(buf)) reason = "reason too long"; - sprintf (buf, "code = %d: %s", code, reason); + snprintf (buf, 255, "code = %d: %s", code, reason); if (krb_udp_debug) { printf ("Sending error packet to '%s'.'%s'@'%s' containing %s\n",