From: Wolfgang Denk Date: Wed, 13 Apr 2011 22:25:34 +0200 Subject: [U-Boot] [PATCH] Fix bad padding of bootp request packet In-Reply-To: <1296687808-10086-1-git-send-email-sjg@chromium.org> References: <1296687808-10086-1-git-send-email-sjg@chromium.org> Message-ID: <20110413202534.577481537B0@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Simon Glass, In message <1296687808-10086-1-git-send-email-sjg@chromium.org> you wrote: > This seems to pad to one byte longer than required > > Change-Id: I86a888a9f5f27356e260c0457d92468d5923a756 > > Signed-off-by: Simon Glass > --- > net/bootp.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/net/bootp.c b/net/bootp.c > index 1a71786..87b027e 100644 > --- a/net/bootp.c > +++ b/net/bootp.c > @@ -464,7 +464,7 @@ static int DhcpExtended (u8 * e, int message_type, IPaddr_t ServerID, IPaddr_t R > > /* Pad to minimal length */ > #ifdef CONFIG_DHCP_MIN_EXT_LEN > - while ((e - start) <= CONFIG_DHCP_MIN_EXT_LEN) > + while ((e - start) < CONFIG_DHCP_MIN_EXT_LEN) > *e++ = 0; > #endif Applied (after removing the Change-Id line from the commit message; hope this is OK). Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de I have a very small mind and must live with it. -- Edsger Dijkstra