Skip to content

Commit 74a1ee5

Browse files
committed
fixed another issue with site compression memory allocation
1 parent 8d55035 commit 74a1ee5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/compress.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ PLL_EXPORT unsigned int * pll_compress_site_patterns(char ** sequence,
188188
}
189189

190190
/* allocate memory for the alignment */
191-
memptr = column[0] = (char *)malloc((size_t)((*length)+1) *
192-
(size_t)count *
191+
memptr = column[0] = (char *)malloc((size_t)(*length) *
192+
(size_t)(count+1) *
193193
sizeof(char));
194194
if (!memptr)
195195
{

0 commit comments

Comments
 (0)