Skip to content

Commit e6b8be9

Browse files
author
Kevin Howe
committed
Allow for null-terminator in long names (reported by Torsten Seemann)
1 parent 047463f commit e6b8be9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
#define _VERSION
2323

2424
#define VERSION_MAJOR 2
25-
#define VERSION_MINOR 3
25+
#define VERSION_MINOR 4
2626

2727
#endif

src/distancemat.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ struct DistanceMatrix *read_phylip_DistanceMatrix( FILE *handle, struct Alignmen
420420
/* In PHYLIP format, the distance matrix is symmetrical. However, also
421421
cope with a bottom-left matrix */
422422
(*aln_loc)->seqs[i] = empty_Sequence();
423-
(*aln_loc)->seqs[i]->name = (char *) malloc_util( strlen(identifier) * sizeof(char));
423+
(*aln_loc)->seqs[i]->name = (char *) malloc_util( (strlen(identifier) + 1) * sizeof(char));
424424
strcpy( (*aln_loc)->seqs[i]->name, identifier );
425425
for (j=0; j < i; j++) {
426426
if (! fscanf( handle, "%lf", &dist))

0 commit comments

Comments
 (0)