diff options
author | Andy Green <andy@warmcat.com> | 2007-07-27 15:43:24 +0200 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 16:47:40 -0700 |
commit | dfe6e81deaa79c85086c0cc8d85b229e444ab97f (patch) | |
tree | 42a137b7642c6faec8a505d16186f3b65b2e2d8d /include/net/ieee80211_radiotap.h | |
parent | 0ec0b7ac3cdfb8635d75aead5733f7a424ea4ad3 (diff) | |
download | op-kernel-dev-dfe6e81deaa79c85086c0cc8d85b229e444ab97f.zip op-kernel-dev-dfe6e81deaa79c85086c0cc8d85b229e444ab97f.tar.gz |
[MAC80211]: Add get_unaligned to ieee80211_get_radiotap_len
ieee80211_get_radiotap_len() tries to dereference radiotap length without
taking care that it is completely unaligned and get_unaligned()
is required.
Signed-off-by: Andy Green <andy@warmcat.com>
Signed-off-by: Jiri Benc <jbenc@suse.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net/ieee80211_radiotap.h')
-rw-r--r-- | include/net/ieee80211_radiotap.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/ieee80211_radiotap.h b/include/net/ieee80211_radiotap.h index 22e0477..dfd8bf6 100644 --- a/include/net/ieee80211_radiotap.h +++ b/include/net/ieee80211_radiotap.h @@ -40,6 +40,7 @@ #include <linux/if_ether.h> #include <linux/kernel.h> +#include <asm/unaligned.h> /* Radiotap header version (from official NetBSD feed) */ #define IEEE80211RADIOTAP_VERSION "1.5" @@ -261,7 +262,7 @@ static inline int ieee80211_get_radiotap_len(unsigned char *data) struct ieee80211_radiotap_header *hdr = (struct ieee80211_radiotap_header *)data; - return le16_to_cpu(hdr->it_len); + return le16_to_cpu(get_unaligned(&hdr->it_len)); } #endif /* IEEE80211_RADIOTAP_H */ |