_increase_buffers
authorDebian BOINC Maintainers <pkg-boinc-devel@lists.alioth.debian.org>
Tue, 28 Aug 2012 03:05:07 +0000 (03:05 +0000)
committerGuo Yixuan <culu.gyx@gmail.com>
Tue, 28 Aug 2012 03:05:07 +0000 (03:05 +0000)
===================================================================

Gbp-Pq: Name 212_increase_buffers.patch

client/seti.cpp
tools/workunit_resample.cpp

index 50ac77f736bbec016e95803b8b9e6c0e030fc505..1ac0ac3811d86174c61f9bbcdc307f60f6b7906b 100644 (file)
@@ -844,10 +844,11 @@ int seti_parse_data(FILE* f, ANALYSIS_STATE& state) {
   unsigned long nbytes, nsamples,samples_per_byte;
   sah_complex *data;
   unsigned long i;
-  char *p, buf[256];
+  char *p, buf[2560];
   sah_complex *bin_data=0;
   int retval=0;
   FORCE_FRAME_POINTER;
+  buf[0]=0;
 
   nsamples = swi.nsamples;
   samples_per_byte=(8/swi.bits_per_sample);
@@ -859,7 +860,7 @@ int seti_parse_data(FILE* f, ANALYSIS_STATE& state) {
   switch(swi.data_type) {
     case DATA_ASCII:
       for (i=0; i<nsamples; i++) {
-        p = fgets(buf, 256, f);
+        p = fgets(buf, sizeof(buf), f);
         if (!p) {
           SETIERROR(READ_FAILED,"in seti_parse_data");
         }
index 051aff8d7902087edb9879ed792578853c2cf1e7..b4a4191978f4123d001c7b50a5461e4f7c04705e 100644 (file)
@@ -62,7 +62,7 @@
 workunit_header header;
 
 int main(int argc, char *argv[]) {
-  char *outfile=NULL, buf[256];
+  char *outfile=NULL, buf[2560];
   struct stat statbuf;
   int nbytes,nread,nsamples;
   std::string tmpbuf("");