samtools / htslib

C library for high-throughput sequencing data formats
Other
789 stars 447 forks source link

Remove use of sprintf() from HTSlib source #1594

Closed daviesrob closed 1 year ago

daviesrob commented 1 year ago

None of these instances were really a problem, but using it upsets some downstream packagers (notably R). The easiest way to keep them happy is to stop using it and (mostly) switch to snprintf() instead.

Fixes #1586

jmarshall commented 1 year ago

Code in test/*.c doesn't go into the library, so you could consider leaving those ones as is. Hmmm… If Apple is going to be pushy about removing sprintf… never mind.