diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2014-11-11 19:26:13 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2014-11-11 19:26:13 +0000 |
commit | c82336615537b65e728cfbf778ac910ce1789fda (patch) | |
tree | 08682802c01b4616fbb90dff78d0ed9b2269ef64 /usr.bin | |
parent | a3db466ebc41760f774a11d03d203f814c9cac1a (diff) |
f{read,write} take a number of items and an item size as arguments, and
return the number of items read of written.
When you intend to return the number of bytes actually processed, it is
wise to pass 1 as the item size and the size as the number of items.
But in *some* places, the OpenSSL does the opposite, and has extra logic
to change a successful return of 1 (item processed) into the real size.
And, guess why it does that? Because of old VMS, for they (used to) have a
substandard stdio implementation.
Note that this change causes the return values of BIO_dump_fp() and
BIO_dump_indent_fp() to no longer be useless (actual number of callback calls),
but actual bytes output. Given the irrelevance of the return value before,
it is unlikely that anything depends upon it (and if something does, it
probably has other problems in need for a fix...)
ok tedu@ beck@ jsing@
Diffstat (limited to 'usr.bin')
0 files changed, 0 insertions, 0 deletions