This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/master by this push:
     new fb66bac  [Bug] Fix null pointer access in json-load (#3692)
fb66bac is described below

commit fb66bac5febd524db830de6a8401fa4f89f39404
Author: worker24h <[email protected]>
AuthorDate: Tue May 26 22:41:30 2020 +0800

    [Bug] Fix null pointer access in json-load (#3692)
    
    Add check for null pointer to avoid core dump
---
 be/src/exprs/json_functions.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/be/src/exprs/json_functions.cpp b/be/src/exprs/json_functions.cpp
index 7903e52..90842fb 100644
--- a/be/src/exprs/json_functions.cpp
+++ b/be/src/exprs/json_functions.cpp
@@ -116,7 +116,7 @@ rapidjson::Value* 
JsonFunctions::match_value(std::vector<JsonPath>& parsed_paths
     for (int i = 1; i < parsed_paths.size(); i++) {
         VLOG(10) << "parsed_paths: " << parsed_paths[i].debug_string();
 
-        if (root->IsNull()) {
+        if (root == nullptr || root->IsNull()) {
             return nullptr;
         }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to