From cec392c340c0cf15f90e0845755454d4cc95c4fc Mon Sep 17 00:00:00 2001 From: andersen Date: Sat, 10 Nov 2001 11:16:39 +0000 Subject: Can't use RESERVE_CONFIG_BUFFER here since the allocation size varies meaning BUFFERS_GO_ON_STACK will fail git-svn-id: svn://busybox.net/trunk/busybox@3643 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- networking/tftp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/networking/tftp.c b/networking/tftp.c index 38a6f81f0..1e5dddbd2 100644 --- a/networking/tftp.c +++ b/networking/tftp.c @@ -162,7 +162,9 @@ static inline int tftp(const int cmd, const struct hostent *host, int want_option_ack = 0; #endif - RESERVE_CONFIG_BUFFER(buf, tftp_bufsize + 4); /* Opcode + Block # + Data */ + /* Can't use RESERVE_CONFIG_BUFFER here since the allocation + * size varies meaning BUFFERS_GO_ON_STACK would fail */ + char *buf=xmalloc(tftp_bufsize + 4); tftp_bufsize += 4; -- cgit v1.2.3-55-g6feb