From ae6d05fbb30ca8c0370b2be8cc1810b028616830 Mon Sep 17 00:00:00 2001 From: Xavier Roche Date: Thu, 29 May 2014 08:20:07 +0000 Subject: Allocation cleanup (why "+2", why ?) --- src/htslib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/htslib.c') diff --git a/src/htslib.c b/src/htslib.c index 9c06cd5..c058733 100644 --- a/src/htslib.c +++ b/src/htslib.c @@ -3081,7 +3081,7 @@ int linputsoc_t(T_SOC soc, char *s, int max, int timeout) { } int linput_trim(FILE * fp, char *s, int max) { int rlen = 0; - char *ls = (char *) malloct(max + 2); + char *ls = (char *) malloct(max + 1); s[0] = '\0'; if (ls) { -- cgit v1.2.3