Looks syslog() is bombing if "words" is NULL. Adding a check for a NULL "words" 
parameter appears to solve the problem. Here's a patch.


Neil Kohl
Manager, ACP-ASIM Online              
American College of Physicians - American Society of Internal Medicine
[EMAIL PROTECTED]              215.351.2638, 800.523.1546 x2638



*** htdig-3.1.6-090301/htsearch/Display.cc      Tue Jul 24 17:01:02 2001
--- htdig-3.1.6-090301-patched/htsearch/Display.cc      Fri Jan 24 10:58:22 2003
*************** Display::logSearch(int page, List *match
*** 1743,1749 ****
      syslog(level, "%s [%s] (%s) [%s] [%s] (%d/%s) - %d -- %s\n",
           host,
           input->exists("config") ? input->get("config") : "default",
!          config["match_method"], input->get("words"), logicalWords.get(),
           nMatches, config["matches_per_page"],
           page, ref
           );
--- 1743,1751 ----
      syslog(level, "%s [%s] (%s) [%s] [%s] (%d/%s) - %d -- %s\n",
           host,
           input->exists("config") ? input->get("config") : "default",
!          config["match_method"], 
!          input->exists("words") ? input->get("words") : "", 
!          logicalWords.get(),
           nMatches, config["matches_per_page"],
           page, ref
           );



Neil Kohl
Manager, ACP-ASIM Online              
American College of Physicians - American Society of Internal Medicine
[EMAIL PROTECTED]              215.351.2638, 800.523.1546 x2638


>>> "Neil Kohl" <[EMAIL PROTECTED]> 01/23/03 10:45AM >>>
Hi, all.

On our site htsearch occasionally throws server errors when called directly (eg enter 
/cgi-bin/htsearch in your browser instead of submitting the search form). I finally 
had some time to dig into it.

This appears to be a bug related to setting logging=true. Turning off logging in the 
config file produces the expected result (a "No matches" page). 

Gory details: Solaris 9, htdig 3.1.6 2001-09-03 snapshot compiled with gcc 2.8.1. 

Stack backtrace from gdb:

(gdb) bt
#0  0xff1b2ea0 in strlen ()
#1  0xff204130 in _doprnt ()
#2  0xff206114 in vsnprintf ()
#3  0xff1d15b0 in _vsyslog ()
#4  0xff1d10ec in _syslog ()
#5  0x3248c in Display::logSearch (this=0xffbfe4b8, page=1, matches=0x9c248)
    at Display.cc:1749
#6  0x2bfe8 in Display::display (this=0xffbfe4b8, pageNumber=1)
    at Display.cc:108
#7  0x345e8 in main (ac=1014888, av=0xcb960) at htsearch.cc:337

If there's any other info I can provide, let me know.

Thanks,



Neil Kohl
Manager, ACP-ASIM Online              
American College of Physicians - American Society of Internal Medicine
[EMAIL PROTECTED]              215.351.2638, 800.523.1546 x2638




-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com 
_______________________________________________
htdig-general mailing list <[EMAIL PROTECTED]>
To unsubscribe, send a message to <[EMAIL PROTECTED]> with a 
subject of unsubscribe
FAQ: http://htdig.sourceforge.net/FAQ.html



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
htdig-general mailing list <[EMAIL PROTECTED]>
To unsubscribe, send a message to <[EMAIL PROTECTED]> with a 
subject of unsubscribe
FAQ: http://htdig.sourceforge.net/FAQ.html

Reply via email to