Module: kamailio
Branch: master
Commit: 64a391a2408b1d34569947f8b028915ec3462e6d
URL:
https://github.com/kamailio/kamailio/commit/64a391a2408b1d34569947f8b028915…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-01-17T22:37:10+01:00
core: udp server - cast printed debug chars to unsigned
- reported by GH #1403
---
Modified: src/core/udp_server.c
---
Diff:
https://github.com/kamailio/kamailio/commit/64a391a2408b1d34569947f8b028915…
Patch:
https://github.com/kamailio/kamailio/commit/64a391a2408b1d34569947f8b028915…
---
diff --git a/src/core/udp_server.c b/src/core/udp_server.c
index b88d3d8f51..3d54c5a9a6 100644
--- a/src/core/udp_server.c
+++ b/src/core/udp_server.c
@@ -479,7 +479,7 @@ int udp_rcv_loop()
if(isprint(buf[i])) {
printbuf[j++] = buf[i];
} else {
- l = snprintf(printbuf+j, 6, " %02X ", buf[i]);
+ l = snprintf(printbuf+j, 6, " %02X ", (unsigned char)buf[i]);
if(l<0 || l>=6) {
LM_ERR("print buffer building failed (%d/%d/%d)\n",
l, j, i);