<!DOCTYPE html>
<html>
<head>
</head>
<body>
<dl style="line-height: 1.5; margin-left: 2em">
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Author</dt>
<dd style="margin-left: 8.5em">Susumu Yata <susum****@gmail*****></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Date</dt>
<dd style="margin-left: 8.5em">2018-02-23 13:02:55 +0900 (Fri, 23 Feb 2018)</dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">New Revision</dt>
<dd style="margin-left: 8.5em"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee">e62a15f18b005b28c2586c485d5b8657e4a947ee</a></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Message</dt>
<dd style="margin-left: 8.5em"><pre style="border: 1px solid #aaa; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; padding: 0.5em; width: auto">ii: fix a bug that grn_ii_column_update can crash
grn_ii_column_update crashed when oldvalue == NULL or newvalue == NULL.</pre></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Modified files</dt>
<dd style="margin-left: 8.5em">
<ul>
<li><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758a">lib/ii.c</a></li>
</ul>
</dd>
</dl>
<div class="diff-section" style="clear: both">
<table style="border-collapse: collapse; border: 1px solid #aaa">
<thead>
<tr class="diff-header" style="border: 1px solid #aaa">
<td colspan="3">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre"> Modified: lib/ii.c (+8 -4)</span>
<span class="diff-header-mark" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">===================================================================</span>
</pre>
</td>
</tr>
</thead>
<tbody>
<tr>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aL6384">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aL6385">6385</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aL6386">6386</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aL6387">6387</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aL6388">6388</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aL6389">6389</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aL6390">6390</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aL6391">6391</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aL6392">6392</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffecec; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aL6393">6393</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffecec; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aL6394">6394</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aL6395">6395</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aL6396">6396</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aL6397">6397</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aL6411">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aL6412">6412</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aL6413">6413</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aL6414">6414</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffecec; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aL6415">6415</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffecec; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aL6416">6416</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aL6417">6417</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aL6418">6418</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aL6419">6419</a></span>
</pre>
</th>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aR6384">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aR6385">6385</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aR6386">6386</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aR6387">6387</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aR6388">6388</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aR6389">6389</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aR6390">6390</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aR6391">6391</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aR6392">6392</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aR6393">6393</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aR6394">6394</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aR6395">6395</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aR6396">6396</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aR6397">6397</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aR6411">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aR6412">6412</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aR6413">6413</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aR6414">6414</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aR6415">6415</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aR6416">6416</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aR6417">6417</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aR6418">6418</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aR6419">6419</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aR6420">6420</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aR6421">6421</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aR6422">6422</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/e62a15f18b005b28c2586c485d5b8657e4a947ee#diff-cf87acdbcbd22709a858df5c01e6758aR6423">6423</a></span>
</pre>
</th>
<td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -6385,13 +6385,13 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">grn_ii_column_update(grn_ctx *ctx, grn_ii *ii, grn_id rid, unsigned int section,</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> unsigned int old_n = 0, new_n = 0;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> if (old) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> old_n = grn_vector_size(ctx, old);</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+ GRN_OBJ_INIT(&old_elem, GRN_BULK, GRN_OBJ_DO_SHALLOW_COPY, old->header.domain);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> if (new) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> new_n = grn_vector_size(ctx, new);</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+ GRN_OBJ_INIT(&new_elem, GRN_BULK, GRN_OBJ_DO_SHALLOW_COPY, new->header.domain);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> max_n = (old_n > new_n) ? old_n : new_n;</span>
<span class="diff-deleted" style="background-color: #ffecec; color: #000000; display: block; white-space: pre">- GRN_OBJ_INIT(&old_elem, GRN_BULK, GRN_OBJ_DO_SHALLOW_COPY, old->header.domain);</span>
<span class="diff-deleted" style="background-color: #ffecec; color: #000000; display: block; white-space: pre">- GRN_OBJ_INIT(&new_elem, GRN_BULK, GRN_OBJ_DO_SHALLOW_COPY, new->header.domain);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> for (i = 0; i < max_n; i++) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> grn_rc rc;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> grn_obj *old_p = NULL, *new_p = NULL;</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -6412,8 +6412,12 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">grn_ii_column_update(grn_ctx *ctx, grn_ii *ii, grn_id rid, unsigned int section,</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> break;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
<span class="diff-deleted" style="background-color: #ffecec; color: #000000; display: block; white-space: pre">- GRN_OBJ_FIN(ctx, &old_elem);</span>
<span class="diff-deleted" style="background-color: #ffecec; color: #000000; display: block; white-space: pre">- GRN_OBJ_FIN(ctx, &new_elem);</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+ if (old) {</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+ GRN_OBJ_FIN(ctx, &old_elem);</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+ }</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+ if (new) {</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+ GRN_OBJ_FIN(ctx, &new_elem);</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+ }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> return ctx->rc;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>