BIO_s_file() and files that are larger than int - how is overflow handled?

Graham Leggett minfrin at sharp.fm
Thu Dec 24 09:12:00 UTC 2020


Hi all,

According to the manpage at https://www.openssl.org/docs/man1.1.0/man3/BIO_s_file.html the macro BIO_tell() casts to int:

/opt/local/include//openssl/bio.h:# define BIO_tell(b)     (int)BIO_ctrl(b,BIO_C_FILE_TELL,0,NULL)

What happens if the file being parsed is larger than can fit in an int? Does BIO_s_file() do anything to limit the size of the file?

Does openssl detect overflow, or do I have to detect overflow?

Regards,
Graham
—



More information about the openssl-users mailing list