samtools / htscodecs

Custom compression for CRAM and others.
Other
30 stars 18 forks source link

Use unsigned chars for ctype macros. #124

Closed jkbonfield closed 4 months ago

jkbonfield commented 4 months ago

On linux these tables are 384 wide, to accommodate -128 to +255. However this is an implementation defined security improvement and the specification is such that the parameter to e.g. isalpha should be unsigned.

Detected with the stock windows gcc install (mingw-w64 didn't complain).

See https://github.com/samtools/htscodecs/pull/123#discussion_r1662357349 for background.

jkbonfield commented 4 months ago

Note Freebsd is failing because the cirrus-ci runner changed from 13.2 to 14.0. It's fixed in #123 so I don't see the need for causing conflicts by fixing it elsewhere too. If we merge this second then the rebased version should pass.