OSDN Git Service

Fix a crash bug caused by unkown aggregation type.
authorKyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
Mon, 5 Jun 2017 10:19:22 +0000 (19:19 +0900)
committerKyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
Tue, 6 Jun 2017 07:44:32 +0000 (16:44 +0900)
Unknown aggregation type caused a crash. This happens only on
development but should be treated as the same as other similar cases.

pgsp_json_text.c

index 839ae62..137b0c6 100644 (file)
@@ -83,6 +83,9 @@ SETTERDECL(strategy)
        
        p = search_word_table(strategies, val, PGSP_JSON_TEXTIZE);
 
+       if (!p)
+               return;
+
        switch (vals->nodetag)
        {
                case T_Agg: