diff options
Diffstat (limited to 'src/option.cc')
-rw-r--r-- | src/option.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/option.cc b/src/option.cc index ab6c37e0..81f9af5b 100644 --- a/src/option.cc +++ b/src/option.cc @@ -42,6 +42,11 @@ namespace { { char buf[128]; char * p = buf; + + if (name.length() > 127) { + throw_(option_error, _f("Illegal option --%1%") % name); + } + foreach (char ch, name) { if (ch == '-') *p++ = '_'; |