for gcc/ada/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* gnatvsn.adb (Gnat_Version_String): Don't overrun Ver_Len_Max.
* gnatvsn.ads (Ver_Len_Max): Bump up to 256.
* g-comver.adb (Ver_Len_Max): Likewise.
===================================================================
@@ -37,7 +37,7 @@
package body GNAT.Compiler_Version is
- Ver_Len_Max : constant := 64;
+ Ver_Len_Max : constant := 256;
-- This is logically a reference to Gnatvsn.Ver_Len_Max but we cannot
-- import this directly since run-time units cannot WITH compiler units.
===================================================================
@@ -74,6 +74,8 @@ package body Gnatvsn is
S (Pos + 1) := Version_String (Pos);
Pos := Pos + 1;
+
+ exit when Pos = Ver_Len_Max;
end loop;
return S (1 .. Pos);
===================================================================
@@ -70,7 +70,7 @@ package Gnatvsn is
-- Return the name of the Copyright holder to be displayed by the different
-- GNAT tools when switch --version is used.
- Ver_Len_Max : constant := 64;
+ Ver_Len_Max : constant := 256;
-- Longest possible length for Gnat_Version_String in this or any
-- other version of GNAT. This is used by the binder to establish
-- space to store any possible version string value for checks. This