_increase_buffers
authorDebian BOINC Maintainers <pkg-boinc-devel@lists.alioth.debian.org>
Tue, 30 Sep 2014 12:49:40 +0000 (12:49 +0000)
committerGianfranco Costamagna <costamagnagianfranco@yahoo.it>
Tue, 30 Sep 2014 12:49:40 +0000 (12:49 +0000)
Gbp-Pq: Name 212_increase_buffers.patch

client/seti.cpp
tools/workunit_resample.cpp

index c4a6861398ad34ddb8822701474d864a1becdc5f..6e684167d17e3efa4d2873f24a35694b5060ecf4 100644 (file)
@@ -1024,10 +1024,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;
 #ifdef USE_MANUAL_CALLSTACK
   call_stack.enter("seti_parse_data()");
 #endif 
@@ -1042,7 +1043,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("");