projects
/
platform
/
upstream
/
neard.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b50ebf9
)
tlv: fix byte ordering issue on "long" TLV length
author
Olivier Guiter
<olivier.guiter@linux.intel.com>
Thu, 15 Dec 2011 10:53:25 +0000
(11:53 +0100)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Thu, 15 Dec 2011 18:21:27 +0000
(19:21 +0100)
src/tlv.c
patch
|
blob
|
history
diff --git
a/src/tlv.c
b/src/tlv.c
index
2952450
..
a073ba5
100644
(file)
--- a/
src/tlv.c
+++ b/
src/tlv.c
@@
-32,7
+32,7
@@
uint16_t near_tlv_length(uint8_t *tlv)
if (tlv[0] == TLV_NULL || tlv[0] == TLV_END)
length = 0;
else if (tlv[1] == 0xff)
- length =
*(uint16_t *)(tlv + 2
);
+ length =
g_ntohs(*(uint16_t *)(tlv + 2)
);
else
length = tlv[1];