Commit 21ef822c authored by Robert Schmidt's avatar Robert Schmidt

Shorten IP address buffer to avoid strncpy() warning

parent 9a789dbb
...@@ -1170,12 +1170,14 @@ int DU_handle_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, ...@@ -1170,12 +1170,14 @@ int DU_handle_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance,
extern instance_t DUuniqInstance; extern instance_t DUuniqInstance;
if (DUuniqInstance == 0) { if (DUuniqInstance == 0) {
char gtp_tunnel_ip_address[128]; char gtp_tunnel_ip_address[32];
sprintf(gtp_tunnel_ip_address, "%d.%d.%d.%d", snprintf(gtp_tunnel_ip_address,
drb_p->up_ul_tnl[0].tl_address & 0xff, sizeof(gtp_tunnel_ip_address),
(drb_p->up_ul_tnl[0].tl_address >> 8) & 0xff, "%d.%d.%d.%d",
(drb_p->up_ul_tnl[0].tl_address >> 16) & 0xff, drb_p->up_ul_tnl[0].tl_address & 0xff,
(drb_p->up_ul_tnl[0].tl_address >> 24) & 0xff); (drb_p->up_ul_tnl[0].tl_address >> 8) & 0xff,
(drb_p->up_ul_tnl[0].tl_address >> 16) & 0xff,
(drb_p->up_ul_tnl[0].tl_address >> 24) & 0xff);
getCxt(DUtype, instance)->gtpInst=du_create_gtpu_instance_to_cu( getCxt(DUtype, instance)->gtpInst=du_create_gtpu_instance_to_cu(
gtp_tunnel_ip_address, gtp_tunnel_ip_address,
getCxt(false,instance)->setupReq.CUport, getCxt(false,instance)->setupReq.CUport,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment