diff options
author | Daniel Willmann <dwillmann@sysmocom.de> | 2016-01-07 17:57:49 +0100 |
---|---|---|
committer | Daniel Willmann <dwillmann@sysmocom.de> | 2016-01-07 18:01:06 +0100 |
commit | a8b6b1e3a1fb195d33f2e244494cb902eec5e405 (patch) | |
tree | 6ad46b36be315080579fb3ae71158bdb118d36ca /src/hnbgw_hnbap.c | |
parent | c858fe9f9091a9a18460a4fa7730b1985de5898c (diff) |
hnbgw_hnbap: Zero IEs_t before decode is called
This ensures that presenceMask is zero and optional fields will be freed
correctly.
This needs to happen for ranap and rua as well.
Diffstat (limited to 'src/hnbgw_hnbap.c')
-rw-r--r-- | src/hnbgw_hnbap.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/hnbgw_hnbap.c b/src/hnbgw_hnbap.c index 971e97e..b810915 100644 --- a/src/hnbgw_hnbap.c +++ b/src/hnbgw_hnbap.c @@ -119,6 +119,7 @@ static int hnbgw_rx_hnb_deregister(struct hnb_context *ctx, ANY_t *in) HNBDe_RegisterIEs_t ies; int rc; + memset(&ies, 0, sizeof(ies)); rc = hnbap_decode_hnbde_registeries(&ies, in); if (rc < 0) return rc; @@ -137,6 +138,7 @@ static int hnbgw_rx_hnb_register_req(struct hnb_context *ctx, ANY_t *in) HNBRegisterRequestIEs_t ies; int rc; + memset(&ies, 0, sizeof(ies)); rc = hnbap_decode_hnbregisterrequesties(&ies, in); if (rc < 0) return rc; @@ -166,6 +168,7 @@ static int hnbgw_rx_ue_register_req(struct hnb_context *ctx, ANY_t *in) char imsi[16]; int rc; + memset(&ies, 0, sizeof(ies)); rc = hnbap_decode_ueregisterrequesties(&ies, in); if (rc < 0) return rc; @@ -207,6 +210,7 @@ static int hnbgw_rx_ue_deregister(struct hnb_context *ctx, ANY_t *in) int rc; uint32_t ctxid; + memset(&ies, 0, sizeof(ies)); rc = hnbap_decode_uede_registeries(&ies, in); if (rc < 0) return rc; @@ -229,6 +233,7 @@ static int hnbgw_rx_err_ind(struct hnb_context *hnb, ANY_t *in) ErrorIndicationIEs_t ies; int rc; + memset(&ies, 0, sizeof(ies)); rc = hnbap_decode_errorindicationies(&ies, in); if (rc < 0) return rc; |