summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/realpath.c
diff options
context:
space:
mode:
authorjsing <>2022-10-17 18:26:41 +0000
committerjsing <>2022-10-17 18:26:41 +0000
commit12051870b7613e05090211a9b7c5ff1483462bee (patch)
tree260c1f65cd3e34bd39f0477a5d06036c3d4e2b78 /src/lib/libc/stdlib/realpath.c
parent68426a72f66e5fdfe8e6dcf8c4403a3b85fdf7b2 (diff)
downloadopenbsd-12051870b7613e05090211a9b7c5ff1483462bee.tar.gz
openbsd-12051870b7613e05090211a9b7c5ff1483462bee.tar.bz2
openbsd-12051870b7613e05090211a9b7c5ff1483462bee.zip
Avoid potential divide by zero in BIO_dump_indent_cb()
Passing an indent value of 67 results in DUMP_WIDTH_LESS_IDENT returning a value of zero, which is promptly used for division. Likewise, passing a value larger than 67 results in a negative value being returned. Prevent this by limiting indent to 64 (which matches OpenSSL's current behaviour), as well as ensuring that dump_width is > 0. Should fix oss-fuzz #52464 and #52467. ok miod@ tb@
Diffstat (limited to 'src/lib/libc/stdlib/realpath.c')
0 files changed, 0 insertions, 0 deletions