Skip to content

Commit

Permalink
Do not rely on null-terminated strings in FORMAT. Fixes #1031
Browse files Browse the repository at this point in the history
  • Loading branch information
pd3 committed May 31, 2019
1 parent 4caf1fd commit d68da18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vcfmerge.c
Original file line number Diff line number Diff line change
Expand Up @@ -1482,7 +1482,7 @@ void merge_format_string(args_t *args, const char *key, bcf_fmt_t **fmt_map, bcf
{
kstring_t *str = &ma->str[ismpl++];
str->l = 0;
kputs(src, str);
kputsn(src, fmt_ori->n, str);
if ( nmax < str->l ) nmax = str->l;
src += fmt_ori->n;
}
Expand Down

0 comments on commit d68da18

Please sign in to comment.