[sr-dev] git:master:29beb58a: ims_qos: Safety check on length of ports
Carsten Bock
carsten at ng-voice.com
Thu Feb 2 08:22:14 CET 2017
Module: kamailio
Branch: master
Commit: 29beb58ae99a61e611973fe8d9d246fb97d6587b
URL: https://github.com/kamailio/kamailio/commit/29beb58ae99a61e611973fe8d9d246fb97d6587b
Author: Carsten Bock <carsten at ng-voice.com>
Committer: Carsten Bock <carsten at ng-voice.com>
Date: 2017-02-02T08:22:05+01:00
ims_qos: Safety check on length of ports
---
Modified: src/modules/ims_qos/rx_aar.c
---
Diff: https://github.com/kamailio/kamailio/commit/29beb58ae99a61e611973fe8d9d246fb97d6587b.diff
Patch: https://github.com/kamailio/kamailio/commit/29beb58ae99a61e611973fe8d9d246fb97d6587b.patch
---
diff --git a/src/modules/ims_qos/rx_aar.c b/src/modules/ims_qos/rx_aar.c
index d4c299a..e87195f 100644
--- a/src/modules/ims_qos/rx_aar.c
+++ b/src/modules/ims_qos/rx_aar.c
@@ -1004,14 +1004,14 @@ int rx_send_aar_register(struct sip_msg *msg, AAASession* auth, saved_transactio
raw_stream.s = 0;
raw_stream.len = 0;
- char c_port_from[5];
+ char c_port_from[10];
str port_from;
- port_from.len = sprintf(c_port_from, "%u", saved_t_data->via_port);
+ port_from.len = snprintf(c_port_from, 10, "%u", saved_t_data->via_port);
port_from.s = c_port_from;
- char c_port_to[5];
+ char c_port_to[10];
str port_to;
- port_to.len = sprintf(c_port_to, "%u", saved_t_data->recv_port);
+ port_to.len = snprintf(c_port_to, 10, "%u", saved_t_data->recv_port);
port_to.s = c_port_to;
str protocol;
More information about the sr-dev
mailing list