X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=package%2Fnetwork%2Fservices%2Fhostapd%2Fpatches%2F052-AP-add-missing-null-pointer-check-in-hostapd_free_ha.patch;fp=package%2Fnetwork%2Fservices%2Fhostapd%2Fpatches%2F052-AP-add-missing-null-pointer-check-in-hostapd_free_ha.patch;h=85d5127f600d2de3fbbf1ef9c4d68cb4a8ae1eb0;hb=52a5f4491c642fcb524494800ce64c5040901b86;hp=0000000000000000000000000000000000000000;hpb=a8bfdf2ed4d930ca5a31b5c4bc7061ad5ef11ba3;p=openwrt%2Fopenwrt.git diff --git a/package/network/services/hostapd/patches/052-AP-add-missing-null-pointer-check-in-hostapd_free_ha.patch b/package/network/services/hostapd/patches/052-AP-add-missing-null-pointer-check-in-hostapd_free_ha.patch new file mode 100644 index 0000000000..85d5127f60 --- /dev/null +++ b/package/network/services/hostapd/patches/052-AP-add-missing-null-pointer-check-in-hostapd_free_ha.patch @@ -0,0 +1,20 @@ +From: Felix Fietkau +Date: Wed, 1 May 2024 18:55:24 +0200 +Subject: [PATCH] AP: add missing null pointer check in hostapd_free_hapd_data + +When called from wpa_supplicant, iface->interfaces can be NULL + +Signed-off-by: Felix Fietkau +--- + +--- a/src/ap/hostapd.c ++++ b/src/ap/hostapd.c +@@ -502,7 +502,7 @@ void hostapd_free_hapd_data(struct hosta + struct hapd_interfaces *ifaces = hapd->iface->interfaces; + size_t i; + +- for (i = 0; i < ifaces->count; i++) { ++ for (i = 0; ifaces && i < ifaces->count; i++) { + struct hostapd_iface *iface = ifaces->iface[i]; + size_t j; +