projects
/
fw
/
stlink
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix segv if only --reset option given
[fw/stlink]
/
flash
/
main.c
diff --git
a/flash/main.c
b/flash/main.c
index 014b627e9da288df2c8434bdebf176228827ecd6..d550eeeeda9c158c34d6a06a0341d20aaf07ef14 100644
(file)
--- a/
flash/main.c
+++ b/
flash/main.c
@@
-48,6
+48,8
@@
static int get_opts(struct opts* o, int ac, char** av)
{
o->reset = 0;
}
+
+ if (ac < 1) return -1;
/* stlinkv2 */
o->devname = NULL;