From e442d8add4ecb2615e8f265627f71e2d8b425be4 Mon Sep 17 00:00:00 2001 From: Vitalii Koshura Date: Fri, 20 Jul 2018 16:12:28 +0300 Subject: [PATCH] script_validator segfault fix Fix script to verify that both init_script and compare_script parameters are defined Signed-off-by: Vitalii Koshura --- sched/script_validator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sched/script_validator.cpp b/sched/script_validator.cpp index 337c99a008..e53e69a4db 100644 --- a/sched/script_validator.cpp +++ b/sched/script_validator.cpp @@ -76,9 +76,9 @@ int validate_handler_init(int argc, char** argv) { } } - if (!init_script.size() && !compare_script.size()) { + if (!init_script.size() || !compare_script.size()) { log_messages.printf(MSG_CRITICAL, - "script names missing from command line\n" + "init_script and/or compare_script names are missing from command line\n" ); return 1; }