public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot, v2] libfdt: Fix segfault when calling fit_check_format() on corrupt FIT images
Date: Thu, 19 Jun 2014 11:20:02 -0400	[thread overview]
Message-ID: <20140619152002.GD20480@bill-the-cat> (raw)
In-Reply-To: <1393432341-1654-1-git-send-email-trini@ti.com>

On Wed, Feb 26, 2014 at 11:32:21AM -0500, Tom Rini wrote:

> From: Jon Nalley <lists@bluebot.org>
> 
> It has been observed that fit_check_format() will fail when passed a
> corrupt FIT image.  This was tracked down to _fdt_string_eq():
> return (strlen(p) == len) && (memcmp(p, s, len) == 0);
> 
> In the case of a corrupt FIT image one can't depend on 'p' being NULL
> terminated.  I changed it to use strnlen() to fix the issue.
> 
> Signed-off-by: Tom Rini <trini@ti.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140619/be91ee53/attachment.pgp>

      reply	other threads:[~2014-06-19 15:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-26 16:32 [U-Boot] [PATCH v2] libfdt: Fix segfault when calling fit_check_format() on corrupt FIT images Tom Rini
2014-06-19 15:20 ` Tom Rini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140619152002.GD20480@bill-the-cat \
    --to=trini@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox