From 2063fc8903e57d36d68c2bc823acb845f58d7da8 Mon Sep 17 00:00:00 2001 From: "sanghyeok.oh" Date: Tue, 30 Jul 2019 17:06:38 +0900 Subject: [PATCH] dbuspolicy-printer: fix segfault due to invalid input -i opt expecting serialized file. Change-Id: I31bde3750deaa43c8148f2469e74a52e7ef4ba15 Signed-off-by: sanghyeok.oh --- src/dbuspolicy_printer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dbuspolicy_printer.cpp b/src/dbuspolicy_printer.cpp index 25a45fa..691ea20 100644 --- a/src/dbuspolicy_printer.cpp +++ b/src/dbuspolicy_printer.cpp @@ -14,7 +14,7 @@ static const struct option options[] = { static void print_help(const char *name) { cout << endl; - cout << "usage: " << name << " [-i input_filename] [-v]" << endl; + cout << "usage: " << name << " [-i serialized filename] [-v]" << endl; cout << " " << name << " {--system|--session} [-v]" << endl; cout << " -v - just verify, don't print anything" << endl; cout << endl; @@ -69,7 +69,7 @@ int main(int argc, char *argv[]) { ldp_serialized::StorageBackendSerialized storage; - if (!storage.init(input_filename.c_str(), just_verify)) { + if (!storage.init(input_filename.c_str(), true)) { if (just_verify) cout << input_filename << ": FAILED" << endl; return EXIT_FAILURE; -- 2.7.4