Kentaro Hayashi
null+****@clear*****
Fri Dec 9 11:10:05 JST 2016
Kentaro Hayashi 2016-12-09 11:10:05 +0900 (Fri, 09 Dec 2016) New Revision: a05f929ca9fd1ace2a01ba3989d5021ab04baa52 https://github.com/groonga/groonga/commit/a05f929ca9fd1ace2a01ba3989d5021ab04baa52 Merged 466ef75: Merge pull request #612 from groonga/null-check-in-grn_column_find_index_data_column_range Message: Add missing NULL check about return value of grn_ctx_at There is a case that grn_ctx_at returns NULL. In such a case, missing NULL check causes crash unexpectedly. Modified files: lib/db.c Modified: lib/db.c (+1 -0) =================================================================== --- lib/db.c 2016-12-07 23:52:08 +0900 (6b602ac) +++ lib/db.c 2016-12-09 11:10:05 +0900 (ae4d877) @@ -12550,6 +12550,7 @@ grn_column_find_index_data_column_range(grn_ctx *ctx, grn_obj *obj, grn_obj_default_set_value_hook_data *data = (void *)GRN_NEXT_ADDR(hooks); grn_obj *target = grn_ctx_at(ctx, data->target); int section; + if (!target) { continue; } if (target->header.type != GRN_COLUMN_INDEX) { continue; } section = (MULTI_COLUMN_INDEXP(target)) ? data->section : 0; if (section_buf) { *section_buf = section; } -------------- next part -------------- HTML����������������������������...Download