home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!psgrain!percy!hfglobe!ichips!iWarp.intel.com|eff!sol.ctr.columbia.edu!spool.mu.edu!sgiblab!munnari.oz.au!mel.dit.csiro.au!mineng.dmpe.CSIRO.AU!dmssyd.syd.dms.CSIRO.AU!metro!grivel!alsvid!mark
- From: mark@alsvid.une.edu.au (Mark Andrew Garrett)
- Newsgroups: comp.infosystems.gopher
- Subject: more bugs gopher1.1b1 and gopher1.03
- Message-ID: <Bxr6vn.C7J@alsvid.une.edu.au>
- Date: 15 Nov 92 10:38:11 GMT
- Organization: University of New England - Northern Rivers (Lismore)
- Lines: 63
-
- After my last post I've found what I belive to be more bugs in the STRstring.c
- some affect both 1.03 and 1.1b1
-
-
- *** STRstring.c-DIST Sun Nov 15 20:47:58 1992
- --- STRstring.c Sun Nov 15 21:32:22 1992
- ***************
- *** 1,3 ****
- --- 1,20 ----
- + static char RCSIDSTRstrings[] = "@(#) $Header: /usr/users/cno/mark/cwis/gopher/gopher1.1b1/object/RCS/STRstring.c,v 1.3 1992/11/15 10:32:03 mark Exp mark $";
- + /*
- + ** $Log: STRstring.c,v $
- + * Revision 1.3 1992/11/15 10:32:03 mark
- + * fix STRcat need to pass st to STRset
- + *
- + * Revision 1.2 1992/11/15 10:30:38 mark
- + * fix STRnewSet need to allow for null terminator in malloc
- + *
- + * Revision 1.1 1992/11/15 10:29:20 mark
- + * Initial revision
- + *
- + **
- + ** Add RCS and start some buf fixes
- + **
- + */
- +
- #include "STRstring.h"
- #include "String.h"
- #include "Malloc.h"
- ***************
- *** 18,24 ****
- if (in == NULL)
- return(temp);
-
- ! len = strlen(in);
-
- temp->data = (char *) malloc(len * sizeof(char*));
- strcpy(temp->data, in);
- --- 35,41 ----
- if (in == NULL)
- return(temp);
-
- ! len = strlen(in) + 1; /* allow for null termination.... */
-
- temp->data = (char *) malloc(len * sizeof(char*));
- strcpy(temp->data, in);
- ***************
- *** 140,146 ****
- strcpy(temp, STRget(st));
- strcat(temp, cp);
-
- ! STRset(temp);
-
- free(temp);
-
- --- 157,163 ----
- strcpy(temp, STRget(st));
- strcat(temp, cp);
-
- ! STRset(st,temp); /* original code did not pass st */
-
- free(temp);
-
-