cbg-ethz / PredictHaplo

This software aims at reconstructing haplotypes from next-generation sequencing data.
GNU General Public License v3.0
5 stars 0 forks source link

Missing null-terminator in conversion to vector of integers #11

Closed m-8k closed 2 years ago

m-8k commented 2 years ago

The following code snippet converts to a vector of integers:

https://github.com/cbg-ethz/PredictHaplo/blob/ef3943af97c5bfbcd70388cbbcd52c9cd06803d2/PredictHaplo_externAlign.cpp#L3362-L3367

However, since c only has length 1, the string it represents is not null-terminated. This is reported by address sanitizer.