[Pkg-gnupg-commit] [gnupg2] 108/205: gpg: Fix NULL-segv for missing tofu DB.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed May 11 08:38:24 UTC 2016


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch experimental
in repository gnupg2.

commit e2c5781788f765815532410a77077ddbb72513e9
Author: Werner Koch <wk at gnupg.org>
Date:   Tue Mar 29 13:30:19 2016 +0200

    gpg: Fix NULL-segv for missing tofu DB.
    
    * g10/tofu.c (opendb): Guard call to timeout function.
    --
    
    GnuPG-bug-id: 2294
    
    Fix not tested but is pretty obvious.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>
---
 g10/tofu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/g10/tofu.c b/g10/tofu.c
index 6a88172..baa2ac2 100644
--- a/g10/tofu.c
+++ b/g10/tofu.c
@@ -706,7 +706,8 @@ opendb (char *filename, enum db_type type)
 
   /* If a DB is locked wait up to 5 seconds for the lock to be cleared
      before failing.  */
-  sqlite3_busy_timeout (db, 5 * 1000);
+  if (db)
+    sqlite3_busy_timeout (db, 5 * 1000);
 
   if (filename_free)
     xfree (filename);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list