]> git.ipfire.org Git - thirdparty/hostap.git/commit
RSN: Avoid undefined behavior in pointer arithmetic
authorJouni Malinen <j@w1.fi>
Sun, 18 Oct 2015 14:16:39 +0000 (17:16 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 25 Oct 2015 13:34:59 +0000 (15:34 +0200)
commit2461724c0501c5518fb064abc0a6342d24400604
tree5f49918c35292fe926dfc21d3cdbfad57163772d
parentf758ae76655301c08173b505db27deb407a2aca3
RSN: Avoid undefined behavior in pointer arithmetic

Reorder terms in a way that no invalid pointers are generated with
pos+len operations. end-pos is always defined (with a valid pos pointer)
while pos+len could end up pointing beyond the end pointer which would
be undefined behavior.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/rsn_supp/wpa.c
src/rsn_supp/wpa_ie.c