diff options
author | Christopher Faylor <me@cgf.cx> | 2005-02-27 06:10:58 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-02-27 06:10:58 +0000 |
commit | 2391eea57e01f6d44f5bff134171ccc2ce9803a9 (patch) | |
tree | 46dfd8a1564d1fd0347340239fc5a659277d3141 /winsup/utils/regtool.cc | |
parent | d61925786a19f2ee513c969ad7cb421a7db762b7 (diff) | |
download | cygnal-2391eea57e01f6d44f5bff134171ccc2ce9803a9.tar.gz cygnal-2391eea57e01f6d44f5bff134171ccc2ce9803a9.tar.bz2 cygnal-2391eea57e01f6d44f5bff134171ccc2ce9803a9.zip |
* regtool.cc (main): Avoid a SEGV when nothing follows -K.
Diffstat (limited to 'winsup/utils/regtool.cc')
-rw-r--r-- | winsup/utils/regtool.cc | 5 |
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 (); |