Fix some krb5_storage_write() usages

This commit is contained in:
Nicolas Williams
2017-05-26 16:19:52 -05:00
committed by Viktor Dukhovni
parent 2c542ce8b1
commit 122cdc578e
5 changed files with 52 additions and 36 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2006 - 2007 Kungliga Tekniska Högskolan
* Copyright (c) 2006 - 2017 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -925,7 +925,7 @@ fill_zeros(krb5_context context, krb5_storage *sp, size_t len)
if (l > sizeof(zeros))
l = sizeof(zeros);
sret = krb5_storage_write(sp, zeros, l);
if (sret <= 0)
if (sret != l)
return krb5_enomem(context);
len -= sret;