[med-svn] [relion] 04/07: d/p/0006: Add patch to copy only the target size of bytes

Gert Wollny gert-guest at moszumanska.debian.org
Wed Jun 29 14:09:48 UTC 2016


This is an automated email from the git hooks/post-receive script.

gert-guest pushed a commit to branch master
in repository relion.

commit b2931988e3fb0b69443a88aba3cc2db8565ccc44
Author: Gert Wollny <gw.fossdev at gmail.com>
Date:   Wed Jun 29 13:48:06 2016 +0000

    d/p/0006: Add patch to copy only the target size of bytes
---
 debian/patches/0006-correct-copy-overflow.patch | 15 +++++++++++++++
 debian/patches/series                           |  1 +
 2 files changed, 16 insertions(+)

diff --git a/debian/patches/0006-correct-copy-overflow.patch b/debian/patches/0006-correct-copy-overflow.patch
new file mode 100644
index 0000000..7e11148
--- /dev/null
+++ b/debian/patches/0006-correct-copy-overflow.patch
@@ -0,0 +1,15 @@
+--- a/src/rwIMAGIC.h
++++ b/src/rwIMAGIC.h
+@@ -266,10 +266,10 @@
+     if ( typeid(T) == typeid(DOUBLE) ||
+          typeid(T) == typeid(float) ||
+          typeid(T) == typeid(int) )
+-        strcpy(header->type,"REAL");
++      strncpy(header->type,"REAL", 4);
+     else if ( typeid(T) == typeid(unsigned char) ||
+               typeid(T) == typeid(signed char) )
+-        strcpy(header->type,"PACK");
++      strncpy(header->type,"PACK", 4);
+     else
+         REPORT_ERROR("ERROR write IMAGIC image: invalid typeid(T)");
+ 
diff --git a/debian/patches/series b/debian/patches/series
index a803b43..d5bc623 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
 0003-Add-enable-gui-flag-to-configure.patch
 0004-Fix-fltk-header-includes.patch
 0005-gcc-6.patch
+0006-correct-copy-overflow.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/relion.git



More information about the debian-med-commit mailing list