]> andersk Git - openssh.git/blobdiff - buffer.c
- dtucker@cvs.openbsd.org 2004/02/27 22:44:56
[openssh.git] / buffer.c
index aee293f8bd4092bc2c0020bc4170faadb8dcb057..9217cb2695cf9ad68be4545b4d76ab9fced181d4 100644 (file)
--- a/buffer.c
+++ b/buffer.c
@@ -12,7 +12,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: buffer.c,v 1.18 2003/09/16 21:02:39 markus Exp $");
+RCSID("$OpenBSD: buffer.c,v 1.21 2003/11/21 11:57:03 djm Exp $");
 
 #include "xmalloc.h"
 #include "buffer.h"
@@ -39,6 +39,7 @@ buffer_free(Buffer *buffer)
 {
        if (buffer->alloc > 0) {
                memset(buffer->buf, 0, buffer->alloc);
+               buffer->alloc = 0;
                xfree(buffer->buf);
        }
 }
@@ -104,7 +105,7 @@ restart:
                goto restart;
        }
        /* Increase the size of the buffer and retry. */
-       
+
        newlen = buffer->alloc + len + 32768;
        if (newlen > 0xa00000)
                fatal("buffer_append_space: alloc %u not supported",
@@ -168,7 +169,7 @@ buffer_ptr(Buffer *buffer)
 void
 buffer_dump(Buffer *buffer)
 {
-       int i;
+       u_int i;
        u_char *ucp = buffer->buf;
 
        for (i = buffer->offset; i < buffer->end; i++) {
This page took 0.60637 seconds and 4 git commands to generate.