[U-Boot] [U-Boot, v2, 1/1] tools: sunxi: avoid read after end of string
Tom Rini
trini at konsulko.com
Sun May 7 01:28:09 UTC 2017
On Thu, May 04, 2017 at 10:26:42PM +0200, xypron.glpk at gmx.de wrote:
> The evaluation of option -c is incorrect:
>
> According to the C99 standard endptr in the first strtol is always
> set as &endptr is not NULL.
> So the first part of the or condition is always true.
> If all digits in optarg are valid endptr will point to the closing \0
> and the second strtol will read beyond the end of the string optarg
> points to.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> Acked-by: Boris Brezillon <boris.brezillon at free-electrons.com>
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: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170506/bad7aaff/attachment.sig>
More information about the U-Boot
mailing list