[sr-dev] git:master:2db88849: xhttp: do not call memset on a null-pointer, related to GH #2619

Henning Westerholt hw at skalatan.de
Tue Feb 2 19:43:33 CET 2021


Module: kamailio
Branch: master
Commit: 2db8884945844e5040dfed2b24fe84de097c0b2b
URL: https://github.com/kamailio/kamailio/commit/2db8884945844e5040dfed2b24fe84de097c0b2b

Author: Henning Westerholt <hw at skalatan.de>
Committer: Henning Westerholt <hw at skalatan.de>
Date: 2021-02-02T18:42:35Z

xhttp: do not call memset on a null-pointer, related to GH #2619

---

Modified: src/modules/xhttp/xhttp_trans.c

---

Diff:  https://github.com/kamailio/kamailio/commit/2db8884945844e5040dfed2b24fe84de097c0b2b.diff
Patch: https://github.com/kamailio/kamailio/commit/2db8884945844e5040dfed2b24fe84de097c0b2b.patch

---

diff --git a/src/modules/xhttp/xhttp_trans.c b/src/modules/xhttp/xhttp_trans.c
index ff9ff82d9f..e24409a53b 100644
--- a/src/modules/xhttp/xhttp_trans.c
+++ b/src/modules/xhttp/xhttp_trans.c
@@ -66,7 +66,7 @@ int xhttp_tr_eval_xhttpurl(
 					(char *)pkg_malloc((val->rs.len + 1) * sizeof(char));
 			if(_httpurl_str.s == NULL) {
 				PKG_MEM_ERROR;
-				memset(&_httpurl_str.s, 0, sizeof(str));
+				memset(&_httpurl_str, 0, sizeof(str));
 				return -1;
 			}
 		}




More information about the sr-dev mailing list