Fix fd_fetch() return value for short reads

This commit is contained in:
Nicolas Williams
2017-05-26 14:23:51 -05:00
committed by Viktor Dukhovni
parent c551ad9458
commit e17cbff0ae

View File

@@ -53,8 +53,10 @@ fd_fetch(krb5_storage * sp, void *data, size_t size)
if (count < 0) {
if (errno == EINTR)
continue;
else
else if (rem == size)
return count;
else
return size - rem;
} else if (count == 0) {
return count;
}