aboutsummaryrefslogtreecommitdiff
path: root/winsup/utils
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-02-27 06:10:58 +0000
committerChristopher Faylor <me@cgf.cx>2005-02-27 06:10:58 +0000
commit2391eea57e01f6d44f5bff134171ccc2ce9803a9 (patch)
tree46dfd8a1564d1fd0347340239fc5a659277d3141 /winsup/utils
parentd61925786a19f2ee513c969ad7cb421a7db762b7 (diff)
downloadnewlib-2391eea57e01f6d44f5bff134171ccc2ce9803a9.zip
newlib-2391eea57e01f6d44f5bff134171ccc2ce9803a9.tar.gz
newlib-2391eea57e01f6d44f5bff134171ccc2ce9803a9.tar.bz2
* regtool.cc (main): Avoid a SEGV when nothing follows -K.
Diffstat (limited to 'winsup/utils')
-rw-r--r--winsup/utils/ChangeLog4
-rw-r--r--winsup/utils/regtool.cc5
2 files changed, 8 insertions, 1 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog
index 64b530d..7f980c6 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 403923b..6954c65 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 ();