aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc_nat
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-07-05 07:48:04 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-07-05 07:48:04 +0200
commit9bec10ecd37f5724d7613967d4bf142444038156 (patch)
tree2e6ebb75a77d69f8c2968a5171a78763a0c63ccb /openbsc/src/osmo-bsc_nat
parentb0b8a34dd54933567dbf270147ea0989901f42f8 (diff)
nat: Address coverity warning about uninitialized addr
Use memset on the addr to initialize the entire structure. Fixes: Coverity CID 1042324
Diffstat (limited to 'openbsc/src/osmo-bsc_nat')
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c b/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
index c37daa7f3..8bb6075d1 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
@@ -934,6 +934,7 @@ static int init_mgcp_socket(struct bsc_nat *nat, struct mgcp_config *cfg)
on = 1;
setsockopt(cfg->gw_fd.bfd.fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
+ memset(&addr, 0, sizeof(addr));
addr.sin_family = AF_INET;
addr.sin_port = htons(cfg->source_port);
inet_aton(cfg->source_addr, &addr.sin_addr);