Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-02-27 09:10:58 +0300
committerChristopher Faylor <me@cgf.cx>2005-02-27 09:10:58 +0300
commit2391eea57e01f6d44f5bff134171ccc2ce9803a9 (patch)
tree46dfd8a1564d1fd0347340239fc5a659277d3141 /winsup/utils/regtool.cc
parentd61925786a19f2ee513c969ad7cb421a7db762b7 (diff)
* regtool.cc (main): Avoid a SEGV when nothing follows -K.
Diffstat (limited to 'winsup/utils/regtool.cc')
-rw-r--r--winsup/utils/regtool.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/winsup/utils/regtool.cc b/winsup/utils/regtool.cc
index 403923b2d..6954c6556 100644
--- a/winsup/utils/regtool.cc
+++ b/winsup/utils/regtool.cc
@@ -674,7 +674,10 @@ main (int argc, char **_argv)
print_version ();
exit (0);
case 'K':
- key_sep = *optarg;
+ if (!optarg)
+ usage ();
+ else
+ key_sep = *optarg;
break;
default :
usage ();