[svn] GnuPG - r4596 - trunk/tools

svn author wk cvs at cvs.gnupg.org
Fri Oct 19 10:49:16 CEST 2007


Author: wk
Date: 2007-10-19 10:49:07 +0200 (Fri, 19 Oct 2007)
New Revision: 4596

Modified:
   trunk/tools/ChangeLog
   trunk/tools/gpgconf-comp.c
Log:
Fixed bug 842 (segv in gpgconf)


Modified: trunk/tools/ChangeLog
===================================================================
--- trunk/tools/ChangeLog	2007-10-17 16:37:09 UTC (rev 4595)
+++ trunk/tools/ChangeLog	2007-10-19 08:49:07 UTC (rev 4596)
@@ -1,3 +1,8 @@
+2007-10-19  Werner Koch  <wk at g10code.com>
+
+	* gpgconf-comp.c (retrieve_options_from_file): Don't call fclose
+	with NULL.  Fixes bug 842.
+
 2007-10-12  Werner Koch  <wk at g10code.com>
 
 	* gpg-connect-agent.c (substitute_line): Allow ${foo} syntax.

Modified: trunk/tools/gpgconf-comp.c
===================================================================
--- trunk/tools/gpgconf-comp.c	2007-10-17 16:37:09 UTC (rev 4595)
+++ trunk/tools/gpgconf-comp.c	2007-10-19 08:49:07 UTC (rev 4596)
@@ -1880,7 +1880,7 @@
   list_option->active = 1;
   list_option->value = list;
 
-  if (fclose (list_file) && ferror (list_file))
+  if (list_file && fclose (list_file) && ferror (list_file))
     gc_error (1, errno, "error closing %s", list_pathname);
   xfree (line);
 }




More information about the Gnupg-commits mailing list