Kouhei Sutou
null+****@clear*****
Mon Feb 18 11:56:41 JST 2013
Kouhei Sutou 2013-02-18 11:56:41 +0900 (Mon, 18 Feb 2013) New Revision: 9b22b19481649515931bd1530a85d4b412fb0570 https://github.com/groonga/groonga/commit/9b22b19481649515931bd1530a85d4b412fb0570 Log: Remove wrong fix The fix is introduced in 0968491d39d7dcb10b9ef8347c71514de01e775b: Fix a crash bug that geo_distance() sort by index If there is any not indexed GeoPoint entry, geo_distance() sort by index may cause a crash. Because it touches uninitialized area. Not initialized GeoPoint value or initialized by 0x0 value are not indexed. If they aren't ignored, groonga may be crashed. The real fix is done in 989464181a8d4dc9c3148614eb21821bc3ca72e1. Modified files: lib/geo.c Modified: lib/geo.c (+0 -5) =================================================================== --- lib/geo.c 2013-02-18 11:55:50 +0900 (e6b9fcc) +++ lib/geo.c 2013-02-18 11:56:41 +0900 (9588ad6) @@ -638,8 +638,6 @@ grn_geo_table_sort(grn_ctx *ctx, grn_obj *table, int offset, int limit, grn_geo_point *base_point; geo_entry *ep; - memset(entries, 0, sizeof(geo_entry) * (e + 1)); - base_point = (grn_geo_point *)GRN_BULK_HEAD(arg); n = grn_geo_table_sort_detect_far_point(ctx, table, index, pat, entries, pc, e, accessorp, @@ -652,9 +650,6 @@ grn_geo_table_sort(grn_ctx *ctx, grn_obj *table, int offset, int limit, base_point, d_far, diff_bit); } for (i = 0, ep = entries + offset; i < limit && ep < entries + n; i++, ep++) { - if (ep->id == GRN_ID_NIL) { - break; - } if (!grn_array_add(ctx, (grn_array *)result, (void **)&v)) { break; } *v = ep->id; } -------------- next part -------------- HTML����������������������������...Download