[Groonga-commit] groonga/groonga at ae6b151 [master] Add a missing null check in grn_dat_scan()

Back to archive index

susumu.yata null+****@clear*****
Thu Jan 15 11:34:45 JST 2015


susumu.yata	2015-01-15 11:34:45 +0900 (Thu, 15 Jan 2015)

  New Revision: ae6b151d197eeb5e42a33ce96525c1210b8827c7
  https://github.com/groonga/groonga/commit/ae6b151d197eeb5e42a33ce96525c1210b8827c7

  Message:
    Add a missing null check in grn_dat_scan()

  Modified files:
    lib/dat.cpp

  Modified: lib/dat.cpp (+3 -1)
===================================================================
--- lib/dat.cpp    2015-01-15 11:04:40 +0900 (16dfadb)
+++ lib/dat.cpp    2015-01-15 11:34:45 +0900 (5848e10)
@@ -701,7 +701,9 @@ grn_dat_scan(grn_ctx *ctx, grn_dat *dat, const char *str,
                                                           dat->normalizer,
                                                           flags);
       if (!normalized_string) {
-        *str_rest = str;
+        if (str_rest) {
+          *str_rest = str;
+        }
         return -1;
       }
       grn_string_get_normalized(ctx, normalized_string, &str, &str_size, NULL);
-------------- next part --------------
HTML����������������������������...
Download 



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