In message <43CA260A.9040502@reset.jp> on 01/15/06(19:38:02) you Hiroshi Suzuki <pj4yabth4-mxhgu42gyh3w.ml@delegate.org> wrote: |鈴木です。 |お世話になってます。 | |freyasx-0.99.14 の検索フォームで、検索対象の index を複数指定すると |こんなのが出てしまうようですので、転送します。 ありがとうございます。 |gdb --core=core.15320 ./fsearch.cgi ... |Program terminated with signal 11, Segmentation fault. ... |#0 0x0804bbd0 in wordisin (str=0x8075580 "sx", word=0x80766b2 "cache") at fsearchcgi.cc:1043 |1043 if(sp[len] == 0 || isspace(sp[len])) |(gdb) where |#0 0x0804bbd0 in wordisin (str=0x8075580 "sx", word=0x80766b2 "cache") at fsearchcgi.cc:1043 |#1 0x0804beb0 in get_query (key=0x8070340 "") at fsearchcgi.cc:1128 |#2 0x0804c5f3 in mainx (argc=2, argv=0x0) at fsearchcgi.cc:1285 |#3 0x0804c539 in main (argc=2, argv=0xbffff214) at fsearchcgi.cc:1266 この関数 wordisin() は、freyasx-0.99.1 で導入したままのものですので、その 時からあったバグだったわけですが、スタック上のごみ(不定値)によって動作が 不定になるので、たまたま鈴木さんの環境では 0.99.14 で発症したということで しょう。 修正は同封のパッチのようにします。 なお、複数の索引を指定する場合には、index=x&index=y でも結構ですが、 index=x+y としたほうがスマートではないかとも思います。 D G ┌─┐┬┌──┬┐ //\^^ ( - ); {Do the more with the less -- B. Fuller} ├─┤│└─┐│ / 877m\_< >_ <URL:http://www.delegate.org/delegate/> ┴ └┴──┘┴────────────────────────────── 佐藤豊@情報技術研究部門.産業技術総合研究所(独立行政法人) diff -cr freyasx-0.99.14/freya/src/fsearchcgi.cc ./freya/src/fsearchcgi.cc *** freyasx-0.99.14/freya/src/fsearchcgi.cc Sun Jan 15 05:17:50 2006 --- ./freya/src/fsearchcgi.cc Sun Jan 15 23:20:47 2006 *************** *** 1043,1049 **** --- 1043,1052 ---- if(sp[len] == 0 || isspace(sp[len])) return 1; } + /* while(!isspace(*sp)) + */ + while(*sp && !isspace(*sp)) sp++; } return 0;