aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmsc/db.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-07-04 20:24:02 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-07-04 20:24:02 +0200
commite885951f27cd3ab5e4726b65105114875c5d808c (patch)
treecba84e98e2dc69eaabe10ab73e4ecd8314ca16fa /openbsc/src/libmsc/db.c
parent81cff91ec0ccb54fca5ff21d9287cfc8d12ae5dd (diff)
db: Fix an issue with the memset
We want to memset the entire area of the atuple and not just the first four/eight bytes of the data. Fixes: Coverity CID 1040708
Diffstat (limited to 'openbsc/src/libmsc/db.c')
-rw-r--r--openbsc/src/libmsc/db.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/libmsc/db.c b/openbsc/src/libmsc/db.c
index 4e20e2318..b57a05099 100644
--- a/openbsc/src/libmsc/db.c
+++ b/openbsc/src/libmsc/db.c
@@ -511,7 +511,7 @@ int db_get_lastauthtuple_for_subscr(struct gsm_auth_tuple *atuple,
return -ENOENT;
}
- memset(atuple, 0, sizeof(atuple));
+ memset(atuple, 0, sizeof(*atuple));
atuple->use_count = dbi_result_get_ulonglong(result, "use_count");
atuple->key_seq = dbi_result_get_ulonglong(result, "key_seq");