Skip to contentSkip to conversation

MX28: Fix MXSBOOT segfault if no params specified

PATCH New Marek Vasut 2 participants 3 messages Dec 22, 2011 – Jan 4, 2012 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MX28: Fix MXSBOOT segfault if no params specified

Cc Wolfgang Denk <[email protected]>
Cc Stefano Babic <[email protected]>
---
 tools/mxsboot.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
tools/mxsboot.c +3 -0
index 176753d..8246831 100644
@@ -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;
Signature · 1 line
1.7.7.3
#1 lore raw

PATCH 1/1 MX28: Fix MXSBOOT segfault if no params specified

Quoted 12 lines
Cc Wolfgang Denk <[email protected]>
Cc Stefano Babic <[email protected]>
---
 tools/mxsboot.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
tools/mxsboot.c +0 -0
index 176753d..8246831 100644

tools/mxsboot.c int parse_ops(int argc, char **argv) · line 614

Quoted 9 lines
tools/mxsboot.c +3 -0
@@ -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

#2 lore raw

PATCH 1/1 MX28: Fix MXSBOOT segfault if no params specified

In reply to Marek Vasut

tools/mxsboot.c

Quoted 9 lines · Marek Vasut
Cc Wolfgang Denk <[email protected]>
Cc Stefano Babic <[email protected]>
---
 tools/mxsboot.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
tools/mxsboot.c +0 -0
index 176753d..8246831 100644

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================