commit | b144ab1852e09ec97325ab0da51c92faf1a38a30 | [log] [tgz] |
---|---|---|
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | Fri Apr 26 18:39:00 2019 +0200 |
committer | Tom Rini <trini@konsulko.com> | Sun May 05 08:48:50 2019 -0400 |
tree | 3ee2fcf5eba59f4d75f642e96c8f7f7a11bebc36 | |
parent | bdfcd917026bc8d11f8e9889183f90f32357ebbf [diff] |
lib/display_options: avoid illegal memory access display_options_get_banner_priv() overwrites bytes before the start of the buffer if the buffer size is less then 3. This case occurs in the Sandbox when executing the `ut_print` command. Correctly handle small buffer sizes. Adjust the print unit test to catch when bytes before the buffer are overwritten. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>