From 12287d8baeff73e4a84d672035b3a80f6faf048c Mon Sep 17 00:00:00 2001 From: Leonid Bugaev Date: Thu, 7 Jul 2016 18:41:29 +0300 Subject: [PATCH] Fix type check, and add asserts submodule --- .gitmodules | 3 +++ raw_socket_listener/listener.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index fef1eaa..1c1686b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "vendor/github.com/bitly/go-hostpool"] path = vendor/github.com/bitly/go-hostpool url = https://github.com/bitly/go-hostpool +[submodule "vendor/github.com/bmizerany/assert"] + path = vendor/github.com/bmizerany/assert + url = https://github.com/bmizerany/assert diff --git a/raw_socket_listener/listener.go b/raw_socket_listener/listener.go index fc2be20..a4c88fd 100644 --- a/raw_socket_listener/listener.go +++ b/raw_socket_listener/listener.go @@ -441,7 +441,7 @@ func (t *Listener) readPcap() { } // Invalid length - if ihl * 4 > ipLength { + if int(ihl * 4) > ipLength { continue }