]> git.ipfire.org Git - thirdparty/hostap.git/commit
SAE: Avoid undefined behavior in pointer arithmetic
authorJouni Malinen <j@w1.fi>
Sun, 18 Oct 2015 15:49:56 +0000 (18:49 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 25 Oct 2015 13:34:59 +0000 (15:34 +0200)
commit80c620dbd7fc580f36a30a092493e9ea5cf7bb04
tree7a30b327e7cd928b7e2098c61d0e96e3e524497f
parentf88bcad0152a53d26d36731371508de7b7786de5
SAE: 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/common/sae.c