Module: kamailio Branch: 5.1 Commit: 476a922ad4d50b05a95e43c20c4a2b8b6a98a78f URL: https://github.com/kamailio/kamailio/commit/476a922ad4d50b05a95e43c20c4a2b8b...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2018-01-17T22:49:45+01:00
core: udp server - cast printed debug chars to unsigned
- reported by GH #1403
(cherry picked from commit 64a391a2408b1d34569947f8b028915ec3462e6d)
---
Modified: src/core/udp_server.c
---
Diff: https://github.com/kamailio/kamailio/commit/476a922ad4d50b05a95e43c20c4a2b8b... Patch: https://github.com/kamailio/kamailio/commit/476a922ad4d50b05a95e43c20c4a2b8b...
---
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);