Navigation Menu

Skip to content

Commit

Permalink
Add missing 0 byte string check
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jan 16, 2015
1 parent b7c7b6b commit 22116a6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/expr.c
Expand Up @@ -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);
Expand Down

0 comments on commit 22116a6

Please sign in to comment.