diff options
Diffstat (limited to 'lib/dns/dst_api.c')
| -rw-r--r-- | lib/dns/dst_api.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/dns/dst_api.c b/lib/dns/dst_api.c index 97d2657a171b..7b69538ebd82 100644 --- a/lib/dns/dst_api.c +++ b/lib/dns/dst_api.c @@ -1,5 +1,5 @@ /* - * Portions Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC") + * Portions Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC") * Portions Copyright (C) 1999-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -31,7 +31,7 @@ /* * Principal Author: Brian Wellington - * $Id: dst_api.c,v 1.16.12.12 2010-12-09 01:12:55 marka Exp $ + * $Id$ */ /*! \file */ @@ -1193,7 +1193,8 @@ write_public_key(const dst_key_t *key, int type, const char *directory) { fprintf(fp, " "); isc_buffer_usedregion(&classb, &r); - isc_util_fwrite(r.base, 1, r.length, fp); + if ((unsigned) fwrite(r.base, 1, r.length, fp) != r.length) + ret = DST_R_WRITEERROR; if ((type & DST_TYPE_KEY) != 0) fprintf(fp, " KEY "); @@ -1201,7 +1202,8 @@ write_public_key(const dst_key_t *key, int type, const char *directory) { fprintf(fp, " DNSKEY "); isc_buffer_usedregion(&textb, &r); - isc_util_fwrite(r.base, 1, r.length, fp); + if ((unsigned) fwrite(r.base, 1, r.length, fp) != r.length) + ret = DST_R_WRITEERROR; fputc('\n', fp); fflush(fp); |
