From 4eff3f35841b31d634f87c82f2022ec62bbb6812 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Mon, 12 Oct 2009 16:46:32 -0700 Subject: [PATCH] boot - tftp - Fix bzero() with wild length field. Reported-by: swildner --- lib/libstand/tftp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libstand/tftp.c b/lib/libstand/tftp.c index 550ee338ed..efad4c504e 100644 --- a/lib/libstand/tftp.c +++ b/lib/libstand/tftp.c @@ -126,7 +126,7 @@ recvtftp(struct iodesc *d, void *pkt, size_t max_len, time_t tleft) * get a DATA. */ errno = 0; - bzero(pkt, len); + bzero(pkt, max_len); if (d->xid == 1) { len = -1; while ((tmp_len = readudp(d, pkt, max_len, tleft)) > 0) { -- 2.11.4.GIT