[Debian-med-packaging] Bug#770162: htslib: fai_build_core in faidx.c assumes char is signed

Andreas Tille andreas at fam-tille.de
Sun Dec 14 08:22:44 UTC 2014


Hi Edmund,

thanks for this helpful bug report.  I have commited patches in jessie
branch.

Charles, I'm not sure how you want to deal with this.  I'd regard the
issue RC and it should be uploaded.  However, I'm not really sure how
you want to deal with the git repository and thus I simply commited the
new branch and let you deal with it at your preference.

Kind regards

       Andreas.

On Wed, Nov 19, 2014 at 09:50:18AM +0000, Edmund Grimley Evans wrote:
> Source: htslib
> Version: 1.1-1
> 
> The code looks like this:
> 
> faidx_t *fai_build_core(BGZF *bgzf)
> {
>     char c, *name;
> ...
>     while ( (c=bgzf_getc(bgzf))>=0 ) {
> 
> Clearly on architectures where plain char is unsigned (arm64, armhf,
> ...) this won't work (infinite loop).
> 
> I'd suggest changing the type of c from char to int, which is the return
> type of bgzf_getc.
> 
> This bug is apparently the cause of samtools failing to build:
> 
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=762647
> 
> I can't take credit for identifying the issue as domibel seems to have
> announced it here on Oct 2:
> 
> http://github.com/samtools/samtools/issues/304
> 
> _______________________________________________
> Debian-med-packaging mailing list
> Debian-med-packaging at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-packaging
> 

-- 
http://fam-tille.de



More information about the Debian-med-packaging mailing list