diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-04-22 11:35:14 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-04-22 11:35:14 +0100 |
| commit | 5317f5a6f3415aec5d6e99ca7e6fc89d735bc700 (patch) | |
| tree | dd76000ce44e0f9c543727fdcef1d66e57c750b7 | |
| parent | e0b9aa27ec06ccd97cc32f9d7f14b8a8e99df57c (diff) | |
Fix too-small minimum key file size and improve error message.
| -rw-r--r-- | src/wx/config_dialog.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/wx/config_dialog.cc b/src/wx/config_dialog.cc index eb3736c6c..af4a04e2e 100644 --- a/src/wx/config_dialog.cc +++ b/src/wx/config_dialog.cc @@ -912,8 +912,11 @@ private: if (d->ShowModal() == wxID_OK) { try { boost::filesystem::path p (wx_to_std (d->GetPath ())); - if (boost::filesystem::file_size (p) > 1024) { - error_dialog (this, wxString::Format (_("Could not read key file (%s)"), std_to_wx (p.string ()))); + if (boost::filesystem::file_size (p) > 8192) { + error_dialog ( + this, + wxString::Format (_("Could not read key file; file is too long (%s)"), std_to_wx (p.string ())) + ); return; } |
