From 22e569d430e3157d19d630bf4b4b142c6b6fd9ae Mon Sep 17 00:00:00 2001 From: Matias Fontanini Date: Tue, 18 Oct 2016 07:24:11 -0700 Subject: [PATCH] Fix buffer length check issue on Dot11QosData Fixes #167 --- src/dot11/dot11_data.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dot11/dot11_data.cpp b/src/dot11/dot11_data.cpp index c3fe1d5..a389d32 100644 --- a/src/dot11/dot11_data.cpp +++ b/src/dot11/dot11_data.cpp @@ -136,7 +136,7 @@ Dot11QoSData::Dot11QoSData(const uint8_t* buffer, uint32_t total_sz) InputMemoryStream stream(buffer, total_sz); stream.skip(Dot11Data::header_size()); stream.read(qos_control_); - if (total_sz) { + if (stream) { // If the wep bit is on, then just use a RawPDU if (wep()) { inner_pdu(new Tins::RawPDU(stream.pointer(), stream.size()));