From: Ilan Peer Date: Thu, 27 Oct 2016 12:18:23 +0000 (+0300) Subject: hostapd: Fix adding neighbor entry X-Git-Tag: hostap_2_7~2151 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5ec346902ee23477682647d98d2c2f4dea91501;p=thirdparty%2Fhostap.git hostapd: Fix adding neighbor entry It is possible that a LCI or location civic configuration buffer is valid but contains no data. In such a case do not add the LCI and location civic information to the entry in the neighbor data base. Signed-off-by: Ilan Peer --- diff --git a/src/ap/neighbor_db.c b/src/ap/neighbor_db.c index a2efff618..c6cdbfce2 100644 --- a/src/ap/neighbor_db.c +++ b/src/ap/neighbor_db.c @@ -83,13 +83,13 @@ int hostapd_neighbor_set(struct hostapd_data *hapd, const u8 *bssid, if (!entry->nr) goto fail; - if (lci) { + if (lci && wpabuf_len(lci)) { entry->lci = wpabuf_dup(lci); if (!entry->lci || os_get_time(&entry->lci_date)) goto fail; } - if (civic) { + if (civic && wpabuf_len(civic)) { entry->civic = wpabuf_dup(civic); if (!entry->civic) goto fail;