_increase_buffers
authorDebian BOINC Maintainers <pkg-boinc-devel@lists.alioth.debian.org>
Thu, 14 Jul 2016 09:40:51 +0000 (09:40 +0000)
committerGianfranco Costamagna <locutusofborg@debian.org>
Thu, 14 Jul 2016 09:40:51 +0000 (09:40 +0000)
Gbp-Pq: Name 212_increase_buffers.patch

client/seti.cpp
tools/workunit_resample.cpp

index c566feaec1dbbea1c0e48a30314ee20a00fc5efa..5e08642caa2c8446f2e35d8c3242dae09b49c45a 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("");