[Pkg-running-devel] [garmin-forerunner-tools] 01/02: Fix segmentation fault by properly checking the size of a counter in protocol.c. Great thanks to Fenix for the patch Closes: #816314

Christian Perrier bubulle at moszumanska.debian.org
Wed Apr 6 08:29:05 UTC 2016


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

bubulle pushed a commit to branch master
in repository garmin-forerunner-tools.

commit 21c98adf0eb2bf79e32d321e09ed223f9056d37e
Author: Christian Perrier <bubulle at debian.org>
Date:   Wed Apr 6 08:57:23 2016 +0200

    Fix segmentation fault by properly checking the size of a counter in protocol.c. Great thanks to Fenix for the patch Closes: #816314
---
 debian/changelog                |  9 +++++++++
 debian/patches/816314_fix.patch | 19 +++++++++++++++++++
 debian/patches/series           |  1 +
 3 files changed, 29 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index a861153..e9a1a0f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+garmin-forerunner-tools (0.10repacked-9) UNRELEASED; urgency=medium
+
+  * Fix segmentation fault by properly checking the size of a counter
+    in protocol.c.
+    Great thanks to Fenix for the patch
+    Closes: #816314
+
+ -- Christian Perrier <bubulle at debian.org>  Wed, 06 Apr 2016 08:29:09 +0200
+
 garmin-forerunner-tools (0.10repacked-8) unstable; urgency=medium
 
   * Include Ubuntu patches to avoid segfaults on 64-bit architectures
diff --git a/debian/patches/816314_fix.patch b/debian/patches/816314_fix.patch
new file mode 100644
index 0000000..3a8d2dc
--- /dev/null
+++ b/debian/patches/816314_fix.patch
@@ -0,0 +1,19 @@
+commit da9c57e496f5b88d875329e57fb7d47b3b5e84a9
+Author: Fenix <fenix at calisto>
+Date:   Wed Apr 6 00:25:15 2016 +0200
+
+    Fix #816314 error Segmentation Fault
+
+diff --git a/src/protocol.c b/src/protocol.c
+index 37f66b4..a0c0b36 100644
+--- a/src/protocol.c
++++ b/src/protocol.c
+@@ -583,7 +583,7 @@ garmin_read_a000_a001 ( garmin_unit * garmin )
+ 	  break;
+ 	case Tag_Appl_Prot_Id:
+ 	  memset(datatypes,0,size * sizeof(uint16));
+-	  for ( j = i+1; p.packet.data[3*j] == Tag_Data_Type_Id; j++ ) {
++	  for ( j = i+1; (j<=size) && (p.packet.data[3*j] == Tag_Data_Type_Id); j++ ) {
+ 	    datatypes[j-i-1] = get_uint16(p.packet.data + 3*j + 1);
+ 	  }
+ 	  garmin_assign_protocol(garmin,data,datatypes);
diff --git a/debian/patches/series b/debian/patches/series
index 3cb823c..91b5c9c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@ gcc4.8
 python_dir_from_upstream.patch
 libusb-1.0.patch
 missing-prototypes
+816314_fix.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-running/garmin-forerunner-tools.git



More information about the Pkg-running-devel mailing list