From 261c794c55f2f55e8e92458ddfcbac9635ed2c99 Mon Sep 17 00:00:00 2001 From: Will Trimble Date: Wed, 5 Apr 2017 15:12:07 -0500 Subject: [PATCH 1/2] Fixed bug in input parser--failed to allocate space for the null terminator --- clipper/fastq-lib.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clipper/fastq-lib.cpp b/clipper/fastq-lib.cpp index e4e4321..dfefd2d 100644 --- a/clipper/fastq-lib.cpp +++ b/clipper/fastq-lib.cpp @@ -361,7 +361,7 @@ int getstr (char ** lineptr, size_t *n, FILE * stream, char terminator, int offs NUL-terminate the line buffer. */ assert(*n - nchars_avail == read_pos - *lineptr); - if (nchars_avail < 1) + if (nchars_avail < 2) { if (*n > 64) *n *= 2; From b6455beb1c1e34a1fd1dab853fd0e618c8f10efd Mon Sep 17 00:00:00 2001 From: Will Trimble Date: Wed, 5 Apr 2017 15:13:35 -0500 Subject: [PATCH 2/2] Removed --rsyncable from gzip invokation for portablity --- clipper/ea-bcl2fastq.cpp | 2 +- clipper/fastq-lib.cpp | 2 +- clipper/mirna-quant.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/clipper/ea-bcl2fastq.cpp b/clipper/ea-bcl2fastq.cpp index ece28c0..5bc0a1e 100644 --- a/clipper/ea-bcl2fastq.cpp +++ b/clipper/ea-bcl2fastq.cpp @@ -290,7 +290,7 @@ int main (int argc, char **argv) { ++output_fnum; // output file number is sequential masks[i].rnum=output_fnum; // save file number as "read number" if (usegz) { - outtmp = string_format("gzip -2 --rsyncable -c > %s.%d.fq.gz",out.c_str(),output_fnum); + outtmp = string_format("gzip -2 -c > %s.%d.fq.gz",out.c_str(),output_fnum); fo=popenordie(outtmp.c_str(),"w"); } else { outtmp = string_format("%s.%d.fq",out.c_str(),output_fnum); diff --git a/clipper/fastq-lib.cpp b/clipper/fastq-lib.cpp index dfefd2d..df092c6 100644 --- a/clipper/fastq-lib.cpp +++ b/clipper/fastq-lib.cpp @@ -160,7 +160,7 @@ FILE *gzopen(const char *f, const char *m, bool*isgz) { if (!strcmp(ext,".gz")) { char *tmp=(char *)malloc(strlen(f)+100); if (strchr(m,'w')) { - strcpy(tmp, "gzip -3 --rsyncable > '"); + strcpy(tmp, "gzip -3 > '"); strcat(tmp, f); strcat(tmp, "'"); } else { diff --git a/clipper/mirna-quant.cpp b/clipper/mirna-quant.cpp index d609dbc..98eae13 100644 --- a/clipper/mirna-quant.cpp +++ b/clipper/mirna-quant.cpp @@ -681,7 +681,7 @@ FILE *gzopen(const char *f, const char *m, bool*isgz) { if (!strcmp(fext(f),".gz")) { char *tmp=(char *)malloc(strlen(f)+100); if (strchr(m,'w')) { - strcpy(tmp, "gzip --rsyncable > '"); + strcpy(tmp, "gzip > '"); strcat(tmp, f); strcat(tmp, "'"); } else {