changeset 117:c93c339271a7

sip-in CDR syslog: put a safety limit on string length
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 28 Sep 2022 23:07:46 -0800
parents 3a1f0e13a3ac
children a4450ae8fd09
files sip-in/invite.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/sip-in/invite.c	Wed Sep 28 23:05:38 2022 -0800
+++ b/sip-in/invite.c	Wed Sep 28 23:07:46 2022 -0800
@@ -263,7 +263,7 @@
 	if (rc < 0) {
 gsm_offline:	syslog(LOG_INFO, "Down-call from %s to %s", cdr_str, uri_user);
 		if (hval)
-			syslog(LOG_INFO, "Down-call PAI: %s", hval);
+			syslog(LOG_INFO, "Down-call PAI: %.100s", hval);
 		start_response_out_msg(&resp, "480 GSM service is offline");
 		goto error_resp;
 	}
@@ -335,7 +335,8 @@
 	syslog(LOG_INFO, "Call in%06u from %s to %s", call->in_tag_num,
 		cdr_str, uri_user);
 	if (hval)
-		syslog(LOG_INFO, "Call in%06u PAI: %s", call->in_tag_num, hval);
+		syslog(LOG_INFO, "Call in%06u PAI: %.100s", call->in_tag_num,
+			hval);
 	/* send CRCX to TMGW */
 	tmgw_send_crcx(call);
 	call->overall_state = OVERALL_STATE_CRCX;