diff options
author | Dmitriy Anisimkov <anisimko@adacore.com> | 2019-08-12 09:01:58 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2019-08-12 09:01:58 +0000 |
commit | 8467866f26927d46be47240308278a867e3fb2b0 (patch) | |
tree | 9e70c5cbdf8811cb420a81eefe9a8fdcf45d8101 | |
parent | 4a2e9be1ac7c8f4c37b5deb4ce0b0f39925e56c9 (diff) | |
download | gcc-8467866f26927d46be47240308278a867e3fb2b0.zip gcc-8467866f26927d46be47240308278a867e3fb2b0.tar.gz gcc-8467866f26927d46be47240308278a867e3fb2b0.tar.bz2 |
[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 <anisimko@adacore.com>
gcc/ada/
* libgnat/g-socket.adb (Is_IPv6_Address): Check that no less
then 2 colons in IPv6 numeric address.
From-SVN: r274308
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/libgnat/g-socket.adb | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 8b8a944..e603f04 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,10 @@ 2019-08-12 Dmitriy Anisimkov <anisimko@adacore.com> + * libgnat/g-socket.adb (Is_IPv6_Address): Check that no less + then 2 colons in IPv6 numeric address. + +2019-08-12 Dmitriy Anisimkov <anisimko@adacore.com> + * libgnat/g-comlin.ads, libgnat/g-comlin.adb (Getopt): Add parameter Quiet. Need to do not output error messages to console. Invalid_Switch exception generation surrounded by an diff --git a/gcc/ada/libgnat/g-socket.adb b/gcc/ada/libgnat/g-socket.adb index ceb2cb0..51817ea 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; --------------------- |