]> git.ipfire.org Git - thirdparty/hostap.git/commit - wpa_supplicant/scan.c
Check for NULL qsort() base pointers
authorJoel Cunningham <joel.cunningham@me.com>
Sat, 8 Oct 2016 17:04:15 +0000 (12:04 -0500)
committerJouni Malinen <j@w1.fi>
Sat, 15 Oct 2016 15:58:27 +0000 (18:58 +0300)
commit33111c910bf8c138f3be1cef99b318e26fb28a04
treed17ec2c9263da6ca9ce091c7cad33884946bf387
parent74b23fafe9c951ed45914263a760f902eee1d0bc
Check for NULL qsort() base pointers

There are a couple of places in wpa_supplicant/hostapd where qsort() can
be called with a NULL base pointer. This results in undefined behavior
according to the C standard and with some standard C libraries (ARM RVCT
2.2) results in a data abort/memory exception. Fix this by skipping such
calls since there is nothing needing to be sorted.

Signed-off-by: Joel Cunningham <joel.cunningham@me.com>
hostapd/config_file.c
wpa_supplicant/scan.c