[Skiboot] [PATCH] fsp/op-panel: Fix out of bounds array access and #define display dimensions

Stewart Smith stewart at linux.vnet.ibm.com
Thu Jun 30 16:17:11 AEST 2016


Suraj Jitindar Singh <sjitindarsingh at gmail.com> writes:
> In the function __opal_write_oppanel() coverity complains about an out
> of bounds array access. While the pointer is never actually dereferenced,
> this isn't immediately obvious from the code. Additionally the number and
> length of the lines on the operator panel display are hard coded into
> the function. While we are here we might as well move these into a #define
> statement.
>
> Rework the code in __opal_write_oppanel() where the message is copied into
> the buffer so that coverity won't complain about an out of bounds array
> access and so that it is line number and length agnostic (now relying on
> the #defined values).
>
> Signed-off-by: Suraj Jitindar Singh <sjitindarsingh at gmail.com>
> ---
>  hw/fsp/fsp-op-panel.c | 30 +++++++++++++-----------------
>  include/op-panel.h    |  4 ++++
>  2 files changed, 17 insertions(+), 17 deletions(-)

Thanks! Merged to master as of e46199974cca896f8012743eaad3cae140aba5a9

-- 
Stewart Smith
OPAL Architect, IBM.



More information about the Skiboot mailing list