Fix ipv4_from_asc behavior on invalid Ip addresses
authorAmir Mohammadi <amiremohamadi@yahoo.com>
Wed, 4 Aug 2021 05:13:49 +0000 (09:43 +0430)
committerHugo Landau <hlandau@openssl.org>
Mon, 25 Jul 2022 06:33:20 +0000 (07:33 +0100)
commit65e30e7d56f01008d29e65c9ae7a42ce074def2f
tree67d29a7634a2a29a2c852915a818f634d9f98ab7
parent952fab01bebb15a8408c6ac27b59c28c979f7d49
Fix ipv4_from_asc behavior on invalid Ip addresses

sscanf() call in ipv4_from_asc does not check that
the string is terminated immediately after the last digit.

(cherry picked from commit 8b9a13b43ba3d71e441fca47a52e800ce79b3d2b)

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18847)
crypto/x509v3/v3_utl.c