Home
last modified time | relevance | path

Searched hist:bc846a8c0826575efc6c6649a762d61d6bedbf84 (Results 1 – 1 of 1) sorted by relevance

/rk3399_rockchip-uboot/cmd/
H A Dnvedit.cbc846a8c0826575efc6c6649a762d61d6bedbf84 Tue Sep 26 23:37:11 UTC 2017 Tom Rini <trini@konsulko.com> UPSTREAM: cmd/nvedit.c: Update input handling to cover overflow cases

When we have multiple messages provided, we need to be sure that we do
not exceed the length of our 'message' buffer. In the for loop, make
sure that pos is not larger than message. Only copy in at most however
much of the message buffer remains. Finally, if we have not reached the
end of the message buffer, put in a space and NULL, and if we have,
ensure the buffer is now NULL termined.

Change-Id: I0c4f88803f8525eb6ef0207a6b7fdbec2b43e9ff
Reported-by: Coverity (CID: 165116)
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit c667723ffb50b00585b729ee0da7b0e8c93ffa13)