OSDN Git Service
(root)
/
android-x86
/
external-bluetooth-bluez.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
065e286
)
monitor: Fix checking for sufficient data
author
Johan Hedberg
<johan.hedberg@intel.com>
Wed, 27 Apr 2016 08:25:36 +0000
(11:25 +0300)
committer
Johan Hedberg
<johan.hedberg@intel.com>
Wed, 27 Apr 2016 11:09:16 +0000
(14:09 +0300)
monitor/control.c
patch
|
blob
|
history
diff --git
a/monitor/control.c
b/monitor/control.c
index
508b068
..
710b975
100644
(file)
--- 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);