From dbd93a8963612accffdb74bc9a29435e15b0865a Mon Sep 17 00:00:00 2001 From: Debian BOINC Maintainers Date: Tue, 30 Sep 2014 12:49:40 +0000 Subject: [PATCH] _fix_fgets_warning Gbp-Pq: Name 210_fix_fgets_warning.patch --- client/seti_header.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/client/seti_header.cpp b/client/seti_header.cpp index 79c9a80..56afbc4 100644 --- a/client/seti_header.cpp +++ b/client/seti_header.cpp @@ -191,8 +191,9 @@ SETI_WU_INFO swi; static workunit *wu; int seti_parse_wu_header(FILE* f) { - char buf[256]; + char buf[2560]; int found=0; + buf[0]=0; #ifdef USE_MANUAL_CALLSTACK call_stack.enter("seti_parse_wu_header(FILE *)"); #endif /* USE_MANUAL_CALLSTACK */ @@ -207,13 +208,14 @@ int seti_parse_wu_header(FILE* f) { //swi.fft_len=2048; //swi.ifft_len=8; + char *fgets_return_value; do { - fgets(buf, 256, f); - } while (!feof(f) && !xml_match_tag(buf,"