Skip to content

Commit

Permalink
Allow for null-terminator in long names (reported by Torsten Seemann)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Howe committed Aug 28, 2018
1 parent 047463f commit e6b8be9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
#define _VERSION

#define VERSION_MAJOR 2
#define VERSION_MINOR 3
#define VERSION_MINOR 4

#endif
2 changes: 1 addition & 1 deletion src/distancemat.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ struct DistanceMatrix *read_phylip_DistanceMatrix( FILE *handle, struct Alignmen
/* In PHYLIP format, the distance matrix is symmetrical. However, also
cope with a bottom-left matrix */
(*aln_loc)->seqs[i] = empty_Sequence();
(*aln_loc)->seqs[i]->name = (char *) malloc_util( strlen(identifier) * sizeof(char));
(*aln_loc)->seqs[i]->name = (char *) malloc_util( (strlen(identifier) + 1) * sizeof(char));
strcpy( (*aln_loc)->seqs[i]->name, identifier );
for (j=0; j < i; j++) {
if (! fscanf( handle, "%lf", &dist))
Expand Down

0 comments on commit e6b8be9

Please sign in to comment.