[groonga-dev,00168] Re: [PATCH] test-hash-table.c (retrieve_all_values) で stack overflow

Back to archive index

morit****@razil***** morit****@razil*****
2009年 8月 25日 (火) 01:50:40 JST


こんばんは。森です。

ありがとうございます。取り込ませていただきました。

>>> Yuto Hayamizu さんは書きました:
> 
> こんにちは. はやみずです.
> 32bit 環境において, test-hash-table.c のテスト test_sort_by_uint_key を実行したときに,
> retrieve_all_values で stack overflow でプログラムが落ちるバグを見つけました.
> 
> パッチは github で pull request しておきましたので, 取り込んでいただけると幸いです.
> 
> 
> 
> diff --git a/test/unit/core/test-hash-sort.c b/test/unit/core/test-hash-sort.c
> index dc761a4..8dc7e64 100644
> --- a/test/unit/core/test-hash-sort.c
> +++ b/test/unit/core/test-hash-sort.c
> @@ -190,7 +190,6 @@ retrieve_all_values (grn_array *array, grn_id n_entries)
>      grn_array_cursor_get_value(context, cursor, &array_value);
>      hash_id = array_value;
>      size = grn_hash_get_value(context, hash, *hash_id, value);
> -    value[size]= '\0';
>      values = g_list_append(values, g_strdup(value));
>      id = grn_array_cursor_next(context, cursor);
>    }
> 
> _______________________________________________
> groonga-dev mailing list
> groon****@lists*****
> http://lists.sourceforge.jp/mailman/listinfo/groonga-dev
> 
--
morita




groonga-dev メーリングリストの案内
Back to archive index