* gss-misc.c (recv_token): Do not attempt to malloc 0 bytes
authorEzra Peisach <epeisach@mit.edu>
Wed, 7 Nov 2001 13:48:07 +0000 (13:48 +0000)
committerEzra Peisach <epeisach@mit.edu>
Wed, 7 Nov 2001 13:48:07 +0000 (13:48 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13960 dc483132-0cff-0310-8789-dd5450dbe970

src/appl/gss-sample/ChangeLog
src/appl/gss-sample/gss-misc.c

index 5a5cf81d342552a032b0e4a28a9390ffce96e79e..7eedd70e63b704fea6592e4e20542f67cc8bcf49 100644 (file)
@@ -1,6 +1,10 @@
+2001-11-07  Ezra Peisach  <epeisach@mit.edu>
+
+       * gss-misc.c (recv_token): Do not attempt to malloc 0 bytes.
+
 2001-11-01  Sam Hartman  <hartmans@mit.edu>
 
-       * gss-server.c  gss-client.c:  ONly free buffers returned from
+       * gss-server.c  gss-client.c:  Only free buffers returned from
        GSSAPI using  gss_release_buffer
 
        * gss-client.c (client_establish_context): Trailing null should
index 78e5d2fd8ce75ce9c3de0ff9437eab4b2bd150da..0fc6d9295d711b1b319ddac7e46b6235d9e57441 100644 (file)
@@ -214,7 +214,7 @@ int recv_token(s, flags, tok)
      }
          
      tok->length = ntohl(tok->length);
-     tok->value = (char *) malloc(tok->length);
+     tok->value = (char *) malloc(tok->length ? tok->length : 1);
      if (tok->length && tok->value == NULL) {
         if (display_file)
             fprintf(display_file,