util_buffer.c (g_make_string_buffer): Don't include the trailing
authorTheodore Tso <tytso@mit.edu>
Mon, 25 May 1998 02:02:40 +0000 (02:02 +0000)
committerTheodore Tso <tytso@mit.edu>
Mon, 25 May 1998 02:02:40 +0000 (02:02 +0000)
NULL of the string in the gss buffer's length.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10580 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/gssapi/generic/ChangeLog
src/lib/gssapi/generic/util_buffer.c

index a71aeb1cd7bf1e5bdb341b1e87fcdc8b6b8ba57b..84efdd75add37c7d7366a0c671fc62befab72152 100644 (file)
@@ -1,3 +1,8 @@
+Sun May 24 22:01:29 1998  Theodore Y. Ts'o  <tytso@mit.edu>
+
+       * util_buffer.c (g_make_string_buffer): Don't include the trailing
+               NULL of the string in the gss buffer's length.
+
 1998-05-18  Theodore Ts'o  <tytso@rsts-11.mit.edu>
 
        * util_ordering.c (g_order_free): 
index e715834d9279fc56635532f0a4d0a58aacab8550..77cb2eb2ffe4d26017f1368b619f33828f9e35be 100644 (file)
@@ -35,9 +35,9 @@ int g_make_string_buffer(str, buffer)
      const char *str;
      gss_buffer_t buffer;
 {
-   buffer->length = strlen(str)+1;
+   buffer->length = strlen(str);
 
-   if ((buffer->value = (void *) xmalloc(buffer->length)) == NULL) {
+   if ((buffer->value = (void *) xmalloc(buffer->length + 1)) == NULL) {
       buffer->length = 0;
       return(0);
    }