diff options
Diffstat (limited to 'lib/libssl/src')
-rw-r--r-- | lib/libssl/src/crypto/bio/b_print.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libssl/src/crypto/bio/b_print.c b/lib/libssl/src/crypto/bio/b_print.c index fbff3317968..880dc693035 100644 --- a/lib/libssl/src/crypto/bio/b_print.c +++ b/lib/libssl/src/crypto/bio/b_print.c @@ -806,6 +806,7 @@ int BIO_vprintf (BIO *bio, const char *format, va_list args) } /* As snprintf is not available everywhere, we provide our own implementation. + * In case of overflow or error, this returns -1. * This function has nothing to do with BIOs, but it's closely related * to BIO_printf, and we need *some* name prefix ... * (XXX the function should be renamed, but to what?) */ @@ -830,10 +831,10 @@ int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args) _dopr(&buf, NULL, &n, &retlen, &truncated, format, args); if (truncated) - /* In case of truncation, return -1 like traditional snprintf. + /* In case of truncation, return -1 unlike traditional snprintf. * (Current drafts for ISO/IEC 9899 say snprintf should return * the number of characters that would have been written, - * had the buffer been large enough.) */ + * had the buffer been large enough, as it did historically.) */ return -1; else return (retlen <= INT_MAX) ? (int)retlen : -1; |