From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] MX28: Fix MXSBOOT segfault if no params specified
Date: Thu, 22 Dec 2011 20:55:08 +0100 [thread overview]
Message-ID: <1324583708-19459-1-git-send-email-marek.vasut@gmail.com> (raw)
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Stefano Babic <sbabic@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;
--
1.7.7.3
next reply other threads:[~2011-12-22 19:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-22 19:55 Marek Vasut [this message]
2012-01-03 21:19 ` [U-Boot] [PATCH] MX28: Fix MXSBOOT segfault if no params specified Marek Vasut
2012-01-04 13:38 ` Stefano Babic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1324583708-19459-1-git-send-email-marek.vasut@gmail.com \
--to=marek.vasut@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox