[Debian-med-packaging] Bug#736565: NMU patch for staden-io-lib 1.13.5-1.1

Aníbal Monsalve Salazar anibal at debian.org
Tue Apr 1 10:46:29 UTC 2014


debdiff staden-io-lib_1.13.5-1.dsc staden-io-lib_1.13.5-1.1.dsc
diff -Nru staden-io-lib-1.13.5/debian/changelog staden-io-lib-1.13.5/debian/changelog
--- staden-io-lib-1.13.5/debian/changelog	2014-03-15 03:07:55.000000000 +0000
+++ staden-io-lib-1.13.5/debian/changelog	2014-04-01 04:20:39.000000000 +0100
@@ -1,3 +1,13 @@
+staden-io-lib (1.13.5-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix io_lib/bam.c read
+    Patch by Aleksandar Zlicic
+    Add fix-bam-read.patch
+    Closes: #736565
+
+ -- Anibal Monsalve Salazar <anibal at debian.org>  Tue, 01 Apr 2014 04:19:52 +0100
+
 staden-io-lib (1.13.5-1) unstable; urgency=medium
 
   * New upstream release. 
diff -Nru staden-io-lib-1.13.5/debian/patches/fix-bam-read.patch staden-io-lib-1.13.5/debian/patches/fix-bam-read.patch
--- staden-io-lib-1.13.5/debian/patches/fix-bam-read.patch	1970-01-01 01:00:00.000000000 +0100
+++ staden-io-lib-1.13.5/debian/patches/fix-bam-read.patch	2014-04-01 04:19:23.000000000 +0100
@@ -0,0 +1,36 @@
+Date: Mon, 31 Mar 2014 19:22:13 +0200
+From: Aleksandar Zlicic <Aleksandar.Zlicic at imgtec.com>
+Subject: staden-io-lib: fix io_lib/bam.c read
+
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=736565
+
+We have fixed a bug reported for the staden-io-lib package
+(https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=736565).  The cause
+of this problem is an error in function bam_get_seq(), or to be more
+precise, function's implementation for non-intel architectures.
+
+Function bam_get_seq is used for reading data from alignment blocks in
+BAM files, block by block.
+
+In special cases, when the alignment block being read is the last
+block in BAM file, and the block has no cigar operations and segment
+sequence stored inside of it, function incorrectly detects
+end-of-file.
+
+In that case, block has actually been successfully read, but because
+of erroneous end-of-file detection, it isn't written to output file in
+SAM format.
+
+Attached patch fixes this issue.
+
+--- a/io_lib/bam.c	2014-01-07 17:01:12.000000000 +0000
++++ bio_lib//bam.c	2014-04-01 04:05:16.762660873 +0100
+@@ -1635,7 +1635,7 @@ int bam_get_seq(bam_file_t *b, bam_seq_t
+ 
+     /* The remainder, word aligned */
+     blk_size = blk_ret;
+-    if ((blk_ret = bam_read(b, (char *)bam_cigar(bs), blk_size+4)) == 0)
++    if (((blk_ret = bam_read(b, (char *)bam_cigar(bs), blk_size+4)) == 0) && blk_size != 0)
+ 	return 0;
+     if (blk_size+4 != blk_ret) {
+ 	if (blk_size != blk_ret) {
diff -Nru staden-io-lib-1.13.5/debian/patches/series staden-io-lib-1.13.5/debian/patches/series
--- staden-io-lib-1.13.5/debian/patches/series	2014-03-11 23:05:36.000000000 +0000
+++ staden-io-lib-1.13.5/debian/patches/series	2014-04-01 04:17:07.000000000 +0100
@@ -1 +1,2 @@
 pathmax.patch
+fix-bam-read.patch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/debian-med-packaging/attachments/20140401/5af124cc/attachment.sig>


More information about the Debian-med-packaging mailing list