diff options
author | Christopher Faylor <me@cgf.cx> | 2005-02-27 09:10:58 +0300 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-02-27 09:10:58 +0300 |
commit | 2391eea57e01f6d44f5bff134171ccc2ce9803a9 (patch) | |
tree | 46dfd8a1564d1fd0347340239fc5a659277d3141 /winsup | |
parent | d61925786a19f2ee513c969ad7cb421a7db762b7 (diff) |
* regtool.cc (main): Avoid a SEGV when nothing follows -K.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/utils/ChangeLog | 4 | ||||
-rw-r--r-- | winsup/utils/regtool.cc | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index 64b530d61..7f980c690 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,7 @@ +2005-02-27 Christopher Faylor <cgf@timesys.com> + + * regtool.cc (main): Avoid a SEGV when nothing follows -K. + 2005-02-26 Christopher Faylor <cgf@timesys.com> * kill (getsig): Avoid buffer overflow when generating a signal name. 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 (); |