Index: crypto/openssh/buffer.c
===================================================================
RCS file: /home/ncvs/src/crypto/openssh/buffer.c,v
retrieving revision 1.1.1.1.2.3
diff -c -c -r1.1.1.1.2.3 buffer.c
*** crypto/openssh/buffer.c	28 Sep 2001 01:33:33 -0000	1.1.1.1.2.3
--- crypto/openssh/buffer.c	16 Sep 2003 13:19:26 -0000
***************
*** 69,74 ****
--- 69,76 ----
  void
  buffer_append_space(Buffer *buffer, char **datap, u_int len)
  {
+ 	u_int	newlen;
+ 
  	/* If the buffer is empty, start using it from the beginning. */
  	if (buffer->offset == buffer->end) {
  		buffer->offset = 0;
***************
*** 93,100 ****
  		goto restart;
  	}
  	/* Increase the size of the buffer and retry. */
! 	buffer->alloc += len + 32768;
! 	buffer->buf = xrealloc(buffer->buf, buffer->alloc);
  	goto restart;
  }
  
--- 95,106 ----
  		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",
! 		    newlen);
! 	buffer->buf = xrealloc(buffer->buf, newlen);
! 	buffer->alloc = newlen;
  	goto restart;
  }
  
