[captcp] Fix pkt length errors

Michele Baldessari mbaldessari at fedoraproject.org
Sat Aug 23 20:11:50 UTC 2014


commit dbdc11bd538d8a638b2c7aaacab8633c6a1ebee6
Author: Michele Baldessari <michele at acksyn.org>
Date:   Sat Aug 23 22:06:58 2014 +0200

    Fix pkt length errors
    
    Add upstream commit "1e4d21e41348":
    test of length of pkt needs to be < not <=, equal length should be allowed

 ...gth-of-pkt-needs-to-be-not-equal-length-s.patch |   26 ++++++++++++++++++++
 captcp.spec                                        |    8 +++++-
 2 files changed, 33 insertions(+), 1 deletions(-)
---
diff --git a/0001-test-of-length-of-pkt-needs-to-be-not-equal-length-s.patch b/0001-test-of-length-of-pkt-needs-to-be-not-equal-length-s.patch
new file mode 100644
index 0000000..c4e21da
--- /dev/null
+++ b/0001-test-of-length-of-pkt-needs-to-be-not-equal-length-s.patch
@@ -0,0 +1,26 @@
+From 1e4d21e4134848603387dabfbfb7f484a8608663 Mon Sep 17 00:00:00 2001
+From: Krishna Pagadala <krishnap at twinprime.com>
+Date: Wed, 16 Apr 2014 15:32:30 -0700
+Subject: [PATCH] test of length of pkt needs to be < not <=, equal length
+ should be allowed
+
+---
+ captcp.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/captcp.py b/captcp.py
+index df1cdaf80880..89daf513af6f 100755
+--- a/captcp.py
++++ b/captcp.py
+@@ -568,7 +568,7 @@ class PcapParser:
+     def run(self):
+         try:
+             for ts, pkt in self.pc:
+-                if self.pc.snaplen <= len(pkt):
++                if self.pc.snaplen < len(pkt):
+                     self.packet_len_error(self.pc.snaplen, len(pkt))
+                     sys.exit(1)
+                 packet = self.decode(pkt)
+-- 
+2.1.0
+
diff --git a/captcp.spec b/captcp.spec
index 280f65f..0456f43 100644
--- a/captcp.spec
+++ b/captcp.spec
@@ -3,7 +3,7 @@
 
 Name:		captcp
 Version:	1.7
-Release:	3%{?dist}
+Release:	4%{?dist}
 Summary:	TCP Analyzer for PCAP Files
 License:	GPLv3 and MIT
 URL:		http://research.protocollabs.com/captcp/
@@ -12,6 +12,7 @@ Source1:	captcp.8
 Patch0:		add-mit-license-raphael-js.patch
 Patch1:		fix-install.patch
 Patch2:		correct-python-path.patch
+Patch3:		0001-test-of-length-of-pkt-needs-to-be-not-equal-length-s.patch
 
 BuildArch:	noarch
 BuildRequires:	python2-devel
@@ -33,6 +34,7 @@ for Tcpdump or Wireshark - it complements these tools instead.
 %patch0 -p1
 %patch1 -p1 -b .make
 %patch2 -p1 -b .python
+%patch3 -p1 -b .pktlen
 
 %build
 
@@ -47,6 +49,10 @@ install -m 644 -D %{SOURCE1} %{buildroot}%{_mandir}/man8/captcp.8
 %{_bindir}/captcp
 
 %changelog
+* Sat Aug 23 2014 Michele Baldessari <michele at acksyn.org> - 1.7-4
+- Add "1e4d21e41348": test of length of pkt needs to be < not <=, equal
+  length should be allowed
+
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.7-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 


More information about the scm-commits mailing list