Another fix....
Alan Emtage <bajan@bunyip.com> Wed, 18 August 1993 08:16 UTC
Received: from ietf.nri.reston.va.us by IETF.CNRI.Reston.VA.US id aa00947; 18 Aug 93 4:16 EDT
Received: from CNRI.RESTON.VA.US by IETF.CNRI.Reston.VA.US id aa00941; 18 Aug 93 4:16 EDT
Received: from ucdavis.ucdavis.edu by CNRI.Reston.VA.US id aa02942; 18 Aug 93 4:16 EDT
Received: by ucdavis.ucdavis.edu (4.1/UCD2.05) id AA10919; Wed, 18 Aug 93 01:00:13 PDT
X-Orig-Sender: ietf-wnils-request@ucdavis.edu
Received: from mocha.bunyip.com by ucdavis.ucdavis.edu (4.1/UCD2.05) id AA10857; Wed, 18 Aug 93 00:58:05 PDT
Received: by mocha.bunyip.com (5.65a/IDA-1.4.2b/CC-Guru-2b) id AA04488 (mail destined for ietf-wnils@ucdavis.edu) on Wed, 18 Aug 93 03:59:03 -0400
Message-Id: <9308180759.AA04488@mocha.bunyip.com>
Sender: ietf-archive-request@IETF.CNRI.Reston.VA.US
From: Alan Emtage <bajan@bunyip.com>
Date: Wed, 18 Aug 1993 03:59:03 -0400
X-Mailer: Mail User's Shell (7.2.3 5/22/91)
To: ietf-wnils@ucdavis.edu
Subject: Another fix....
Hi All, Stan Green reported a bug to me which causes the waisindex program to bomb when template entries are continued onto the next line. Below I have included the diffs for the fix. As always, please send bug reports to whois-group@bunyip.com. Thanks. -Alan *** ircfiles.c Fri Jul 30 20:44:35 1993 --- ircfiles.c.1 Wed Aug 18 03:23:06 1993 *************** *** 3092,3104 **** char tmp_str2[2048]; WItem *p; int linelen; tmp_str[0] = '\0'; linelen = strlen(line); ! if(sscanf(line, "%[^:\n]:", tmp_str) != 1){ /* see if it is a blank line */ eptr = tmp_str + strlen(tmp_str); --- 3092,3110 ---- char tmp_str2[2048]; WItem *p; int linelen; + char *c; tmp_str[0] = '\0'; linelen = strlen(line); ! if(sscanf(line, "%[A-Za-z0-9-]*:", tmp_str) != 1){ + strcpy(tmp_str, line); + + if((c = (char *) index(tmp_str, '\n'))) + *c = '\0'; + /* see if it is a blank line */ eptr = tmp_str + strlen(tmp_str); *************** *** 3131,3136 **** --- 3137,3144 ---- /* bypass attribute search go straight to indexing */ + cptr = line; + goto add_index; } *************** *** 3160,3170 **** /* do the indexing additions */ add_index: return_str[0] = '\0'; - - cptr = strchr(line, ':') + 1; if(is_header == 1) strcpy(fieldi_header, cptr); --- 3168,3178 ---- /* do the indexing additions */ + cptr = strchr(line, ':') + 1; + add_index: return_str[0] = '\0'; if(is_header == 1) strcpy(fieldi_header, cptr);
- Another fix.... Alan Emtage