From cf38111115dfe626f46e163d2cf84ac6d2555706 Mon Sep 17 00:00:00 2001 From: JustinChu Date: Thu, 29 Dec 2016 14:58:31 -0800 Subject: [PATCH] buffer size causing undefined behavior bugfix --- BioBloomMaker/BloomFilterGenerator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BioBloomMaker/BloomFilterGenerator.h b/BioBloomMaker/BloomFilterGenerator.h index 4a462a4..59eae61 100644 --- a/BioBloomMaker/BloomFilterGenerator.h +++ b/BioBloomMaker/BloomFilterGenerator.h @@ -88,7 +88,7 @@ class BloomFilterGenerator { { l = kseq_read(seq); if (l >= 0) { - tempStr = new char[l]; + tempStr = new char[l + 1]; strcpy(tempStr, seq->seq.s); } }