[Groonga-commit] groonga/groonga [master] Fixed SEGV of suggest-httpd on absence of target_name.

Back to archive index

null+****@clear***** null+****@clear*****
2010年 12月 14日 (火) 18:00:34 JST


Tasuku SUENAGA a.k.a. gunyarakun	2010-12-14 09:00:34 +0000 (Tue, 14 Dec 2010)

  New Revision: 710934958a32c84102420d324cff71fa50440197

  Log:
    Fixed SEGV of suggest-httpd on absence of target_name.

  Modified files:
    src/suggest/groonga_suggest_httpd.c

  Modified: src/suggest/groonga_suggest_httpd.c (+1 -1)
===================================================================
--- src/suggest/groonga_suggest_httpd.c    2010-12-14 08:47:54 +0000 (f0afb62)
+++ src/suggest/groonga_suggest_httpd.c    2010-12-14 09:00:34 +0000 (138222d)
@@ -92,7 +92,7 @@ atouint64_t(const char *s)
 static int
 suggest_result(struct evbuffer *res_buf, const char *types, const char *query, const char *target_name, grn_obj *cmd_buf, grn_ctx *ctx)
 {
-  if (types && query) {
+  if (target_name && types && query) {
     GRN_BULK_REWIND(cmd_buf);
     GRN_TEXT_PUTS(ctx, cmd_buf, "/d/suggest?table=item_");
     grn_text_urlenc(ctx, cmd_buf, target_name, strlen(target_name));




Groonga-commit メーリングリストの案内
Back to archive index