1 --- 1/buffer.c~ Tue Sep 16 16:18:17 2003
2 +++ 1/buffer.c Tue Sep 16 16:26:59 2003
5 buffer_append_space(Buffer *buffer, u_int len)
10 /* If the buffer is empty, start using it from the beginning. */
14 /* Increase the size of the buffer and retry. */
15 - buffer->alloc += len + 32768;
16 - buffer->buf = xrealloc(buffer->buf, buffer->alloc);
17 + newlen = buffer->alloc + len + 32768;
18 + if (newlen > 0xa00000)
19 + fatal("buffer_append_space: alloc %u not supported", newlen);
20 + buffer->buf = xrealloc(buffer->buf, newlen);
21 + buffer->alloc = newlen;