Cumulative patch from commit c1721f05a0675704aed7470fd4778fcb474f3a92
c1721f05a HS 2.0: Allow CCMP as group cipher for OSEN single SSID case
5ca119657 HS 2.0: Fix Terms and Conditions Server URL macro replacement
420b5dd81 Define test config QCA vendor attribute for HE MAC padding duration
8a9950f7b nl80211: Indicate interface up only for the main netdev
c809756f9 nl80211: Allocate nl_sock for NETLINK_ROUTE when already_in_bridge
946e35eac nl80211: Skip vendor specific DFS offload if upstream mechanism is used
Bug: 112041455
Test: Device boots up and connects to wifi networks.
Test: Able to turn on/off softap.
Test: Passed all regression tests (b/112079055).
Change-Id: I1dadaf2108382320d292e3803fcda9a257fff376
diff --git a/src/radius/radius_server.c b/src/radius/radius_server.c
index e2801ae..d66f766 100644
--- a/src/radius/radius_server.c
+++ b/src/radius/radius_server.c
@@ -950,7 +950,7 @@
}
url_len = os_strlen(url) + ETH_ALEN * 3 - 1 - 3;
- url2 = os_malloc(url_len);
+ url2 = os_malloc(url_len + 1);
if (!url2) {
RADIUS_DEBUG("Failed to allocate room for T&C Server URL");
os_free(url2);
@@ -958,7 +958,7 @@
return NULL;
}
pos2 = url2;
- end2 = url2 + url_len;
+ end2 = url2 + url_len + 1;
os_memcpy(pos2, url, pos - url);
pos2 += pos - url;
os_snprintf(pos2, end2 - pos2, MACSTR, MAC2STR(sess->mac_addr));