From 3306315dc3f42a0794d7887232a6e49893a567e6 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Fri, 26 Mar 1999 03:42:40 +0000 Subject: [PATCH] disp_major_status.c (display_unknown): Fix the length of the buffer to be the size of the returned string, instead of something bigger than the returned string. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11314 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/gssapi/generic/ChangeLog | 6 ++++++ src/lib/gssapi/generic/disp_major_status.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/gssapi/generic/ChangeLog b/src/lib/gssapi/generic/ChangeLog index d5b75a573..ef41d06a2 100644 --- a/src/lib/gssapi/generic/ChangeLog +++ b/src/lib/gssapi/generic/ChangeLog @@ -1,3 +1,9 @@ +Thu Mar 25 22:41:30 1999 Theodore Y. Ts'o + + * disp_major_status.c (display_unknown): Fix the length of the + buffer to be the size of the returned string, instead of + something bigger than the returned string. + 1999-02-19 Theodore Ts'o * Makefile.in (DLL_FILE_DEF): Tell the Makefile template that we diff --git a/src/lib/gssapi/generic/disp_major_status.c b/src/lib/gssapi/generic/disp_major_status.c index 899592ada..e2df893e1 100644 --- a/src/lib/gssapi/generic/disp_major_status.c +++ b/src/lib/gssapi/generic/disp_major_status.c @@ -121,7 +121,7 @@ int display_unknown(kind, value, buffer) sprintf(str, unknown_error, kind, value); - buffer->length = len; + buffer->length = strlen(str); buffer->value = str; return(1); -- 2.26.2