Kouhei Sutou
null+****@clear*****
Fri Jan 16 15:06:10 JST 2015
Kouhei Sutou 2015-01-16 15:06:10 +0900 (Fri, 16 Jan 2015) New Revision: 22116a6978806e51e69a38364bed07c49dc702b4 https://github.com/groonga/groonga/commit/22116a6978806e51e69a38364bed07c49dc702b4 Message: Add missing 0 byte string check Modified files: lib/expr.c Modified: lib/expr.c (+4 -0) =================================================================== --- lib/expr.c 2015-01-16 15:00:10 +0900 (988c76c) +++ lib/expr.c 2015-01-16 15:06:10 +0900 (76181b0) @@ -2703,6 +2703,10 @@ pseudo_query_scan_raw_text_raw_text(grn_ctx *ctx, unsigned int norm_y_raw_length_in_bytes; grn_bool matched = GRN_FALSE; + if (x_len == 0 || y_len == 0) { + return GRN_FALSE; + } + normalizer = grn_ctx_get(ctx, GRN_NORMALIZER_AUTO_NAME, -1); norm_x = grn_string_open(ctx, x, x_len, normalizer, 0); norm_y = grn_string_open(ctx, y, y_len, normalizer, 0); -------------- next part -------------- HTML����������������������������...Download