Allocate udp buffer dynamically

This commit is contained in:
Vladimir Dubrovin committed 2026-05-06 22:45:00 +03:00
1 parent cbab76fe41
commit 0e13f57139
5 files changed
+21 -10

No files matched your search

+2
View File
@@ -57,6 +57,8 @@ int udpsockmap(struct clientparam *param, int timeo)
int nhops = param->udp_nhops;
int clisock_idx = -1, ctrlsock_idx = -1, ctrlsocksrv_idx = -1;
int firstpacket = 1;
if(param->srv->service == S_UDPPM) nhops++;
if (param->srvbufsize < UDPBUFSIZE) {
unsigned char *newbuf = realloc(param->srvbuf, UDPBUFSIZE);
if (!newbuf) return 21;