_increase_buffers
authorDebian BOINC Maintainers <pkg-boinc-devel@lists.alioth.debian.org>
Thu, 17 May 2018 08:09:59 +0000 (09:09 +0100)
committerGianfranco Costamagna <locutusofborg@debian.org>
Thu, 17 May 2018 08:09:59 +0000 (09:09 +0100)
Gbp-Pq: Name 212_increase_buffers.patch

client/seti.cpp
tools/workunit_resample.cpp

index bc14289e3555dbc9dd23fd27976828ef15203876..ad51409c135477188433d0d0a79c6ab73f1b79ae 100644 (file)
@@ -1024,10 +1024,11 @@ int seti_parse_data(FILE* f, ANALYSIS_STATE& state) {
   unsigned long nbytes, nsamples,samples_per_byte;\r
   sah_complex *data;\r
   unsigned long i;\r
-  char *p, buf[256];\r
+  char *p, buf[2560];\r
   sah_complex *bin_data=0;\r
   int retval=0;\r
   FORCE_FRAME_POINTER;\r
+  buf[0]=0;\r
 #ifdef USE_MANUAL_CALLSTACK\r
   call_stack.enter("seti_parse_data()");\r
 #endif \r
@@ -1042,7 +1043,7 @@ int seti_parse_data(FILE* f, ANALYSIS_STATE& state) {
   switch(swi.data_type) {\r
     case DATA_ASCII:\r
       for (i=0; i<nsamples; i++) {\r
-        p = fgets(buf, 256, f);\r
+        p = fgets(buf, sizeof(buf), f);\r
         if (!p) {\r
           SETIERROR(READ_FAILED,"in seti_parse_data");\r
         }\r
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("");