diff --git a/package/network/services/hostapd/src/src/ap/ubus.c b/package/network/services/hostapd/src/src/ap/ubus.c index 247230a243..1a5b29ed9a 100644 --- a/package/network/services/hostapd/src/src/ap/ubus.c +++ b/package/network/services/hostapd/src/src/ap/ubus.c @@ -1212,6 +1212,9 @@ hostapd_rrm_beacon_req(struct ubus_context *ctx, struct ubus_object *obj, if (tb[BEACON_REQ_REPORTING_DETAIL]) reporting_detail = blobmsg_get_u32(tb[BEACON_REQ_REPORTING_DETAIL]); + if (reporting_detail >= 0 && reporting_detail < 3) + buf_len += 3; + req = wpabuf_alloc(buf_len); if (!req) return UBUS_STATUS_UNKNOWN_ERROR;