[Groonga-mysql-commit] mroonga/mroonga at e4a103a [master] Add missing NULL check

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Jul 18 17:23:13 JST 2018


Kouhei Sutou	2018-07-18 17:23:13 +0900 (Wed, 18 Jul 2018)

  New Revision: e4a103a431defae0c07417754186c7dffff5ef5f
  https://github.com/mroonga/mroonga/commit/e4a103a431defae0c07417754186c7dffff5ef5f

  Message:
    Add missing NULL check

  Modified files:
    ha_mroonga.cpp

  Modified: ha_mroonga.cpp (+5 -5)
===================================================================
--- ha_mroonga.cpp    2018-07-18 15:41:19 +0900 (e2fc6b9e)
+++ ha_mroonga.cpp    2018-07-18 17:23:13 +0900 (cfe2c22a)
@@ -10379,11 +10379,11 @@ void ha_mroonga::set_normalizer(grn_obj *lexicon, KEY *key)
     mrn::ParametersParser parser(key->comment.str,
                                  key->comment.length);
     parser.parse();
-    set_normalizer(lexicon,
-                   key,
-                   parser["normalizer"],
-                   strlen(parser["normalizer"]));
-    DBUG_VOID_RETURN;
+    const char *normalizer = parser["normalizer"];
+    if (normalizer) {
+      set_normalizer(lexicon, key, normalizer, strlen(normalizer));
+      DBUG_VOID_RETURN;
+    }
   }
 
   set_normalizer(lexicon, key, NULL, 0);
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-mysql-commit/attachments/20180718/c34d1317/attachment-0001.htm 



More information about the Groonga-mysql-commit mailing list
Back to archive index