[sr-dev] git:master:856a8ff5: core: parse_via - padding field when USE_COMP is defined

Daniel-Constantin Mierla miconda at gmail.com
Mon Jun 14 13:24:55 CEST 2021


Module: kamailio
Branch: master
Commit: 856a8ff51f329ba1fd7c2ab120349ee330aee0d2
URL: https://github.com/kamailio/kamailio/commit/856a8ff51f329ba1fd7c2ab120349ee330aee0d2

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-06-14T13:20:25+02:00

core: parse_via - padding field when USE_COMP is defined

- align to 32bit to avoid sigbus on accessing fields by address on
strict systems

---

Modified: src/core/parser/parse_via.h

---

Diff:  https://github.com/kamailio/kamailio/commit/856a8ff51f329ba1fd7c2ab120349ee330aee0d2.diff
Patch: https://github.com/kamailio/kamailio/commit/856a8ff51f329ba1fd7c2ab120349ee330aee0d2.patch

---

diff --git a/src/core/parser/parse_via.h b/src/core/parser/parse_via.h
index b4e99a09df..ec2b71247f 100644
--- a/src/core/parser/parse_via.h
+++ b/src/core/parser/parse_via.h
@@ -72,6 +72,7 @@ typedef struct via_body {
 	unsigned short port;
 #ifdef USE_COMP
 	short comp_no;
+	short comp_no_pad; /* padding to align to 32bit */
 #endif
 	str port_str;
 	str params;




More information about the sr-dev mailing list