From 261c794c55f2f55e8e92458ddfcbac9635ed2c99 Mon Sep 17 00:00:00 2001 From: Will Trimble Date: Wed, 5 Apr 2017 15:12:07 -0500 Subject: [PATCH] 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;