]> git.ipfire.org Git - thirdparty/hostap.git/commit
Make wpa_config_read_blob() easier for static analyzers
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 19 Jun 2017 18:28:37 +0000 (21:28 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 19 Jun 2017 18:30:45 +0000 (21:30 +0300)
commit3c0daa13d5a4c43e4015e0fcd331f005dcdafe0b
treefda281c341855ca3befdf2c94ab9fe8be9ba8c6e
parentd350084da81ccc6a50ac6c34cbe909f470de979a
Make wpa_config_read_blob() easier for static analyzers

While encoded == NULL could happen in the case of an empty blob, that
will result in encoded_len == 0 and base64_decode() not derefencing the
src argument. That seems to be too difficult for some static analyzers,
so to avoid false warnings, explicitly reject the encoded == NULL case
without even trying to base64 decode it. (CID 164709)

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
wpa_supplicant/config_file.c