From 61cde7a0fa23a9d8bfed48e0882ff5e8e263dab5 Mon Sep 17 00:00:00 2001 From: Jos Collin Date: Fri, 23 Jun 2017 19:08:03 +0530 Subject: [PATCH] common: Passing null pointer option_name to operator << in md_config_t::parse_option() Fixes the Coverity Scan Report: CID 1412776 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)19. var_deref_model: Passing null pointer option_name to operator <<, which dereferences it. Fixed the review comments too in this commit. Signed-off-by: Jos Collin --- src/common/config.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common/config.cc b/src/common/config.cc index 8c026f89a9ffd..5065f4a141dff 100644 --- a/src/common/config.cc +++ b/src/common/config.cc @@ -603,6 +603,7 @@ int md_config_t::parse_option(std::vector& args, } if (ret != 0 || !error_message.empty()) { + assert(option_name); if (oss) { *oss << "Parse error setting " << option_name << " to '" << val << "' using injectargs"; -- 2.39.5