[U-Boot] [PATCHv2 02/21] net: core: Sanitize get/set operations for enetaddr

Simon Glass
2017-04-13T21:16:06Z

On 10 April 2017 at 09:33, Olliver Schinagl <oliver@schinagl.nl> wrote:
> In the current net stack, we have a few functions to get and set
> the "ethaddr" and "ethNaddr" environment variables, which use magic
> values to get and set these environment variables. Remove the magicness
> of the buffer by defining it proper and also check the input for its
> length.
>
> Additionally use the define in fdt parser where the ethaddr variables
> are also used.
>
> Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
> ---
> common/fdt_support.c | 2 +-
> include/net.h | 1 +
> net/eth_common.c | 14 +++++++++-----
> 3 files changed, 11 insertions(+), 6 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>