summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_lib.c
diff options
context:
space:
mode:
authortb <>2022-08-10 16:51:26 +0000
committertb <>2022-08-10 16:51:26 +0000
commit15cfc2cffe59ccd94f73fe1f0ea6ef4f6a97289e (patch)
tree1fe6fb883559ad685757c640bcbb34f9b507b7d8 /src/lib/libssl/ssl_lib.c
parente097d6124bb1a66fdf8fcc1f40049067704fc50a (diff)
downloadopenbsd-15cfc2cffe59ccd94f73fe1f0ea6ef4f6a97289e.tar.gz
openbsd-15cfc2cffe59ccd94f73fe1f0ea6ef4f6a97289e.tar.bz2
openbsd-15cfc2cffe59ccd94f73fe1f0ea6ef4f6a97289e.zip
Avoid signed integer overflow due to unary negation
The current X509_print_ex() tries too hard pretty printing negative serialNumbers (which shouldn't occur in the first place). In particular, negating LONG_MAX leads to signed overflow. Ditch the code dealing with negative serialNumbers representable as long and fall back to the long form printing. This simplifies the code and fixes oss-fuzz #49944 with/ok jsing
Diffstat (limited to 'src/lib/libssl/ssl_lib.c')
0 files changed, 0 insertions, 0 deletions