blob: 80fcad72610832b76fbf1b487033d1ca30499047 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
*** buffer.c.orig Sat Jun 29 06:33:59 2002
--- buffer.c Tue Sep 16 00:33:54 2003
***************
*** 69,74 ****
--- 69,75 ----
void *
buffer_append_space(Buffer *buffer, u_int len)
{
+ u_int newlen;
void *p;
if (len > 0x100000)
***************
*** 98,108 ****
goto restart;
}
/* Increase the size of the buffer and retry. */
! buffer->alloc += len + 32768;
! if (buffer->alloc > 0xa00000)
fatal("buffer_append_space: alloc %u not supported",
! buffer->alloc);
! buffer->buf = xrealloc(buffer->buf, buffer->alloc);
goto restart;
/* NOTREACHED */
}
--- 99,111 ----
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;
/* NOTREACHED */
}
|