[U-Boot] [PATCH] MX28: Fix MXSBOOT segfault if no params specified

Marek Vasut marek.vasut at gmail.com
Tue Jan 3 22:19:48 CET 2012


> Signed-off-by: Marek Vasut <marek.vasut at gmail.com>
> Cc: Wolfgang Denk <wd at denx.de>
> Cc: Stefano Babic <sbabic at denx.de>
> ---
>  tools/mxsboot.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/tools/mxsboot.c b/tools/mxsboot.c
> index 176753d..8246831 100644
> --- a/tools/mxsboot.c
> +++ b/tools/mxsboot.c
> @@ -606,6 +606,9 @@ int parse_ops(int argc, char **argv)
>  	};
>  	int type;
> 
> +	if (argc < 4)
> +		return -1;
> +
>  	for (i = 1; i < argc; i++) {
>  		if (!strncmp(argv[i], "-w", 2))
>  			type = PARAM_WRITE;

BUMP


More information about the U-Boot mailing list