From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Thu, 26 Jul 2018 15:54:26 -0400 Subject: [U-Boot] hashtable: Fix length calculation in hexport_r In-Reply-To: <1531851938-12107-1-git-send-email-zubair@resin.io> References: <1531851938-12107-1-git-send-email-zubair@resin.io> Message-ID: <20180726195426.GK7590@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Jul 17, 2018 at 07:25:38PM +0100, Zubair Lutfullah Kakakhel wrote: > The length returned by hexport_r has a few redundant characters. > This appears as NULL characters at the end so seems harmless. > > Remove the surplus counts in two places > > totlen += strlen(ep->key) + 2; > I'm guessing the +2 here is for = and sep char. But there is another > totlen += 2; line that does that. > > size = totletn + 1; > Doesn't make sense and isn't justified with any comment. > > Signed-off-by: Zubair Lutfullah Kakakhel Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: