]> git.ipfire.org Git - thirdparty/hostap.git/commit
WPS: Avoid bogus static analyzer warning in ndef_parse_record()
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 17 Jul 2015 17:43:17 +0000 (20:43 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 17 Jul 2015 17:43:17 +0000 (20:43 +0300)
commitc7068f106f59a8783f5473746fc134b668673d29
tree8db538ecbf84957a07f50300f52405e9cacb510d
parent6462e7387d558fa4a95e98e61d5d5cd35a2d7690
WPS: Avoid bogus static analyzer warning in ndef_parse_record()

Use a local variable and check the record payload length validity before
writing it into record->payload_length in hopes of getting rid of a
bogus static analyzer warning. The negative return value was sufficient
to avoid record->payload_length being used, but that seems to be too
complex for some analyzers. (CID 122668)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/wps/ndef.c