From: Danny Al-Gaaf Date: Wed, 12 Nov 2014 15:11:49 +0000 (+0100) Subject: ceph_authtool.cc: catch ceph::buffer::end_of_buffer exception X-Git-Tag: v0.90~25^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fa986059b38ad03d9fb87b029780e3396ad6611e;p=ceph.git ceph_authtool.cc: catch ceph::buffer::end_of_buffer exception Fix for: CID 717142 (#1 of 1): Uncaught exception (UNCAUGHT_EXCEPT) root_function: In function main(int, char const **) an exception of type ceph::buffer::end_of_buffer is thrown and never caught. Signed-off-by: Danny Al-Gaaf --- diff --git a/src/tools/ceph_authtool.cc b/src/tools/ceph_authtool.cc index 9156b13a968..a4d3baeea92 100644 --- a/src/tools/ceph_authtool.cc +++ b/src/tools/ceph_authtool.cc @@ -248,7 +248,12 @@ int main(int argc, const char **argv) // read commands if (list) { - keyring.print(cout); + try { + keyring.print(cout); + } catch (ceph::buffer::end_of_buffer &eob) { + cout << "Exception (end_of_buffer) in print(), exit." << std::endl; + exit(1); + } } if (print_key) { CryptoKey key;