Diff between 065e286b640f84402b1a8970218a75154000b020 and 61bad31ced4deb82647b94cae58e0aaeeff27a7e

Changed Files

File Additions Deletions Status
monitor/control.c +2 -2 modified

Full Patch

diff --git a/monitor/control.c b/monitor/control.c
index 508b068..710b975 100644
--- a/monitor/control.c
+++ b/monitor/control.c
@@ -1062,11 +1062,11 @@ static void client_callback(int fd, uint32_t events, void *user_data)
 
 	data->offset += len;
 
-	if (data->offset > MGMT_HDR_SIZE) {
+	if (data->offset >= MGMT_HDR_SIZE) {
 		struct mgmt_hdr *hdr = (struct mgmt_hdr *) data->buf;
 		uint16_t pktlen = le16_to_cpu(hdr->len);
 
-		if (data->offset > pktlen + MGMT_HDR_SIZE) {
+		if (data->offset >= pktlen + MGMT_HDR_SIZE) {
 			uint16_t opcode = le16_to_cpu(hdr->opcode);
 			uint16_t index = le16_to_cpu(hdr->index);