
19 Jun
2018
19 Jun
'18
8:40 p.m.
On Tue, Jun 12, 2018 at 12:04:57AM -0600, Simon Glass wrote:
The use of strcpy() to remove characters at the start of a string is safe in U-Boot, since we know the implementation. But in os.c we are using the C library's strcpy() function, where this behaviour is not permitted.
Update the code to use memcpy() instead.
Reported-by: Coverity (CID: 173279) Signed-off-by: Simon Glass sjg@chromium.org
Changes in v2:
- Also remove the leading / from the "/spl" path
arch/sandbox/cpu/os.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
This ends up breaking the sandbox_spl portions of 'make tests.
--
Tom