]> git.ipfire.org Git - thirdparty/hostap.git/commit
atheros: Avoid undefined behavior in pointer arithmetic
authorJouni Malinen <j@w1.fi>
Sun, 18 Oct 2015 16:07:13 +0000 (19:07 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 25 Oct 2015 13:35:00 +0000 (15:35 +0200)
commitd034f498ce267d8830929dc06ed4ff545381ade4
treef67ab38ee1191b66cba96c50ee57085d3db440d9
parent40762fcede7f6f100fd41e0e2a78804051e1e581
atheros: 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/drivers/driver_atheros.c