]> git.ipfire.org Git - thirdparty/hostap.git/commit
GAS server: Avoid undefined behavior in pointer arithmetic
authorJouni Malinen <j@w1.fi>
Sun, 18 Oct 2015 15:47:55 +0000 (18:47 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 25 Oct 2015 13:34:59 +0000 (15:34 +0200)
commitf88bcad0152a53d26d36731371508de7b7786de5
tree77a4d7c90e30bbfb9f77218d6961c515833c3f4f
parent1e72ba2e61e59be1da59ec43a4e9fc446152081b
GAS server: 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/ap/gas_serv.c