]> git.dujemihanovic.xyz Git - u-boot.git/commit
sandbox: eth-raw-os.c: Ensure that our interface name is not too long
authorTom Rini <trini@konsulko.com>
Tue, 8 Dec 2015 03:26:34 +0000 (22:26 -0500)
committerSimon Glass <sjg@chromium.org>
Tue, 12 Jan 2016 17:19:09 +0000 (10:19 -0700)
commitab971e192adcf0a501c8998542ab116512c0c260
treeb47989baa22ba66a336703e89a3c42d03f2c9313
parent66eaea6cd152a0dae5964930483f68d92047b2f5
sandbox: eth-raw-os.c: Ensure that our interface name is not too long

Coverity notes that we do not ensure when we copy ifname we still have
space left to ensure NULL termination.  As cannot control the size of
ifr_name we must make sure that our argument will not overflow the
buffer.

Reported-by: Coverity (CID 131094)
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/sandbox/cpu/eth-raw-os.c