aboutsummaryrefslogtreecommitdiffstats
path: root/sm/certdump.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2019-05-12 18:41:32 +0000
committerWerner Koch <[email protected]>2019-05-12 18:41:32 +0000
commit8d0d61aca3d2713df8a33444af3658b859d72be8 (patch)
treed742235dbfc3567887ef94c5914b902bc071d00c /sm/certdump.c
parentdoc: correct documentation for gpgconf --kill (diff)
downloadgnupg-8d0d61aca3d2713df8a33444af3658b859d72be8.tar.gz
gnupg-8d0d61aca3d2713df8a33444af3658b859d72be8.zip
sm: Fix a warning in an es_fopencooie function.
* sm/certdump.c (format_name_writer): Take care of a flush request. -- We won't see a flush here so that fix does not solve a real bug but we want to be correct. Note that this function seems to predate the es_fopenmem function and thus in master (2.3) we should replace it entirely. GnuPG-bug-id: 4495 Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'sm/certdump.c')
-rw-r--r--sm/certdump.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sm/certdump.c b/sm/certdump.c
index edee76fa2..ede12106f 100644
--- a/sm/certdump.c
+++ b/sm/certdump.c
@@ -658,6 +658,9 @@ format_name_writer (void *cookie, const void *buffer, size_t size)
struct format_name_cookie *c = cookie;
char *p;
+ if (!buffer) /* Flush. */
+ return 0; /* (Actually we could use SIZE because that should be 0 too.) */
+
if (!c->buffer)
{
p = xtrymalloc (size + 1 + 1);