2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

2567. [bug] dst__privstruct_writefile() could miss write errors.

[RT #19360]
This commit is contained in:
Mark Andrews
2009-03-02 02:03:59 +00:00
parent d55bdffe2f
commit 05c162292f
2 changed files with 8 additions and 2 deletions

View File

@@ -31,7 +31,7 @@
/*
* Principal Author: Brian Wellington
* $Id: dst_api.c,v 1.17 2008/12/01 03:51:47 marka Exp $
* $Id: dst_api.c,v 1.18 2009/03/02 02:03:59 marka Exp $
*/
/*! \file */
@@ -1163,9 +1163,12 @@ write_public_key(const dst_key_t *key, int type, const char *directory) {
fwrite(r.base, 1, r.length, fp);
fputc('\n', fp);
fflush(fp);
if (ferror(fp))
ret = DST_R_WRITEERROR;
fclose(fp);
return (ISC_R_SUCCESS);
return (ret);
}
static isc_result_t