ESP32 BLE Device Information Service (DIS): What's the maximum length of advertised device name & broadcast data?

When using the espressif/ble_services package, you configure the Device Information Service (DIS) to advertise the device name and other data like this:

esp_ble_conn_config_t config = {
    .device_name = "ABC123",
    .broadcast_data = "MyProduct",
};

Here’s the maximum length for those fields:

These parameters are defined in esp_ble_conn_mgr.h