From: Dmitriy Anisimkov Date: Mon, 12 Aug 2019 09:01:58 +0000 (+0000) Subject: [Ada] Fix IPv6 numeric address detection X-Git-Tag: misc/cutover-git~3526 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8467866f26927d46be47240308278a867e3fb2b0;p=thirdparty%2Fgcc.git [Ada] Fix IPv6 numeric address detection IPv6 numeric address can't have less than 2 colons. It fixes the error when Get_Host_By_Name called with hostname composed by only hexadecimal symbols. 2019-08-12 Dmitriy Anisimkov gcc/ada/ * libgnat/g-socket.adb (Is_IPv6_Address): Check that no less then 2 colons in IPv6 numeric address. From-SVN: r274308 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 8b8a944ef65d..e603f04da002 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2019-08-12 Dmitriy Anisimkov + + * libgnat/g-socket.adb (Is_IPv6_Address): Check that no less + then 2 colons in IPv6 numeric address. + 2019-08-12 Dmitriy Anisimkov * libgnat/g-comlin.ads, libgnat/g-comlin.adb (Getopt): Add diff --git a/gcc/ada/libgnat/g-socket.adb b/gcc/ada/libgnat/g-socket.adb index ceb2cb03c6a7..51817ea94d55 100644 --- a/gcc/ada/libgnat/g-socket.adb +++ b/gcc/ada/libgnat/g-socket.adb @@ -1797,7 +1797,7 @@ package body GNAT.Sockets is end if; end loop; - return Colons <= 8; + return Colons in 2 .. 8; end Is_IPv6_Address; ---------------------