]> code.citadel.org Git - citadel.git/commitdiff
* Fixed bug in <R>eplacestring which caused it to lock up in certain conditions
authorArt Cancro <ajc@citadel.org>
Mon, 12 Aug 2002 03:00:20 +0000 (03:00 +0000)
committerArt Cancro <ajc@citadel.org>
Mon, 12 Aug 2002 03:00:20 +0000 (03:00 +0000)
citadel/ChangeLog
citadel/database_sleepycat.c
citadel/messages.c

index 414221c77ba24aa98195f79d48e2809bf2c7fc87..09e4b305f3e44584f1b18a4efb6350a9d7e2bc1d 100644 (file)
@@ -1,4 +1,7 @@
  $Log$
+ Revision 591.87  2002/08/12 03:00:20  ajc
+ * Fixed bug in <R>eplacestring which caused it to lock up in certain conditions
+
  Revision 591.86  2002/08/12 00:09:05  ajc
  * Compress VISIT records using zlib if available.  This reduces the object
    size from over 4k to about 70 bytes.  Experimental.
@@ -3885,3 +3888,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
+
index ae9c5551b52b9e55533335618820a98fdae3eac0..ae63d5e9ae38b9301e38d3854f7fc2effb1a5bd6 100644 (file)
@@ -694,7 +694,9 @@ struct cdbdata *cdb_fetch(int cdb, void *key, int keylen)
 
   tempcdb->len = dret.size;
   tempcdb->ptr = dret.data;
+#ifdef HAVE_ZLIB
   cdb_decompress_if_necessary(tempcdb);
+#endif
   return (tempcdb);
 }
 
@@ -772,7 +774,9 @@ struct cdbdata *cdb_next_item(int cdb)
        cdbret = (struct cdbdata *) mallok(sizeof(struct cdbdata));
        cdbret->len = data.size;
        cdbret->ptr = data.data;
+#ifdef HAVE_ZLIB
        cdb_decompress_if_necessary(cdbret);
+#endif
 
        return (cdbret);
 }
index 89c61fd7880e29450dce9a612b0291099c4e9d12..45396fa95c743b12af8561fa7b77c3563ae90173 100644 (file)
@@ -612,12 +612,12 @@ void replace_string(char *filename, long int startpos)
        long msglen = 0L;
 
        scr_printf("Enter text to be replaced:\n: ");
-       getline(srch_str, 128);
+       getline(srch_str, (sizeof(srch_str)-1) );
        if (strlen(srch_str) == 0)
                return;
 
        scr_printf("Enter text to replace it with:\n: ");
-       getline(rplc_str, 128);
+       getline(rplc_str, (sizeof(rplc_str)-1) );
 
        fp = fopen(filename, "r+");
        if (fp == NULL)