From db249de135c5e931492687a821797b8a44b7ca9c Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 12 Mar 2006 17:53:57 +0000 Subject: r14247: Fix Coverity bug # 136 (This used to be commit 1b247ff2ed380f5b7d28917d74d6ef5609330a45) --- source3/registry/reg_db.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/registry/reg_db.c b/source3/registry/reg_db.c index e26b9a723b..5484c238b6 100644 --- a/source3/registry/reg_db.c +++ b/source3/registry/reg_db.c @@ -525,11 +525,13 @@ static int regdb_pack_values(REGVAL_CTR *values, char *buf, int buflen) int len = 0; int i; REGISTRY_VALUE *val; - int num_values = regval_ctr_numvals( values ); + int num_values; if ( !values ) return 0; + num_values = regval_ctr_numvals( values ); + /* pack the number of values first */ len += tdb_pack( buf+len, buflen-len, "d", num_values ); -- cgit v1.2.3