home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / infosyst / gopher / 1148 < prev    next >
Encoding:
Internet Message Format  |  1992-11-15  |  2.0 KB

  1. 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
  2. From: mark@alsvid.une.edu.au (Mark Andrew Garrett)
  3. Newsgroups: comp.infosystems.gopher
  4. Subject: more bugs gopher1.1b1 and gopher1.03
  5. Message-ID: <Bxr6vn.C7J@alsvid.une.edu.au>
  6. Date: 15 Nov 92 10:38:11 GMT
  7. Organization: University of New England - Northern Rivers (Lismore)
  8. Lines: 63
  9.  
  10. After my last post I've found what I belive to be more bugs in the STRstring.c
  11. some affect both 1.03 and 1.1b1
  12.  
  13.  
  14. *** STRstring.c-DIST    Sun Nov 15 20:47:58 1992
  15. --- STRstring.c    Sun Nov 15 21:32:22 1992
  16. ***************
  17. *** 1,3 ****
  18. --- 1,20 ----
  19. + 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 $";
  20. + /*
  21. + **    $Log: STRstring.c,v $
  22. +  * Revision 1.3  1992/11/15  10:32:03  mark
  23. +  * fix STRcat need to pass st to STRset
  24. +  *
  25. +  * Revision 1.2  1992/11/15  10:30:38  mark
  26. +  * fix STRnewSet need to allow for null terminator in malloc
  27. +  *
  28. +  * Revision 1.1  1992/11/15  10:29:20  mark
  29. +  * Initial revision
  30. +  *
  31. + **
  32. + **    Add RCS and start some buf fixes
  33. + **
  34. + */
  35.   #include "STRstring.h"
  36.   #include "String.h"
  37.   #include "Malloc.h"
  38. ***************
  39. *** 18,24 ****
  40.        if (in == NULL)
  41.         return(temp);
  42.   
  43. !      len = strlen(in);
  44.   
  45.        temp->data = (char *) malloc(len * sizeof(char*));
  46.        strcpy(temp->data, in);
  47. --- 35,41 ----
  48.        if (in == NULL)
  49.         return(temp);
  50.   
  51. !      len = strlen(in) + 1; /* allow for null termination.... */
  52.   
  53.        temp->data = (char *) malloc(len * sizeof(char*));
  54.        strcpy(temp->data, in);
  55. ***************
  56. *** 140,146 ****
  57.        strcpy(temp, STRget(st));
  58.        strcat(temp, cp);
  59.   
  60. !      STRset(temp);
  61.        
  62.        free(temp);
  63.   
  64. --- 157,163 ----
  65.        strcpy(temp, STRget(st));
  66.        strcat(temp, cp);
  67.   
  68. !      STRset(st,temp); /* original code did not pass st */
  69.        
  70.        free(temp);
  71.   
  72.