All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] cmd: nvedit: env_get_f must check for env_get_char error codes
Date: Wed, 31 Jan 2018 09:39:13 +0100	[thread overview]
Message-ID: <20180131083913.cnsjtjfl7mo2sor4@flea.lan> (raw)
In-Reply-To: <20180131065648.5490-1-sgoldschmidt@de.pepperl-fuchs.com>

On Wed, Jan 31, 2018 at 07:56:48AM +0100, Simon Goldschmidt wrote:
> env_get_f calls env_get_char to load single characters from the
> environment. However, the return value of env_get_char was not
> checked for errors. Now if the env driver does not support the
> .get_char call, env_get_f did not notice this and looped over the
> whole size of the environment, calling env_get_char over 8000
> times with the default settings, just to return an error in the
> end.
> 
> Fix this by checking if env_get_char returns < 0.
> 
> Signed-off-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com>

Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180131/6b8fc307/attachment.sig>

  reply	other threads:[~2018-01-31  8:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-31  6:56 [U-Boot] [PATCH] cmd: nvedit: env_get_f must check for env_get_char error codes Simon Goldschmidt
2018-01-31  8:39 ` Maxime Ripard [this message]
2018-01-31 23:00 ` York Sun
2018-02-01  9:16   ` Simon Goldschmidt
2018-02-02 18:51     ` Maxime Ripard
2018-02-02 20:04       ` York Sun
2018-02-05 13:43         ` Maxime Ripard
2018-02-05 16:30           ` York Sun
2018-02-07  8:31             ` Maxime Ripard
2018-02-01 13:09 ` [U-Boot] " Tom Rini
2018-02-03 10:27 [U-Boot] [PATCH] " Goldschmidt Simon

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=20180131083913.cnsjtjfl7mo2sor4@flea.lan \
    --to=maxime.ripard@free-electrons.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.