mirror of git://gcc.gnu.org/git/gcc.git
[Ada] Fix potential Constraint_Error if Library_Version is too long
2018-07-31 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * gnatlink.adb: Fix potential Constraint_Error if Library_Version is too long. From-SVN: r263107
This commit is contained in:
parent
fa9f3f8c44
commit
1c0b35aac9
|
|
@ -1,3 +1,8 @@
|
||||||
|
2018-07-31 Arnaud Charlet <charlet@adacore.com>
|
||||||
|
|
||||||
|
* gnatlink.adb: Fix potential Constraint_Error if
|
||||||
|
Library_Version is too long.
|
||||||
|
|
||||||
2018-07-31 Arnaud Charlet <charlet@adacore.com>
|
2018-07-31 Arnaud Charlet <charlet@adacore.com>
|
||||||
|
|
||||||
* sem_elab.adb: Remove duplicate condition detected by CodePeer.
|
* sem_elab.adb: Remove duplicate condition detected by CodePeer.
|
||||||
|
|
|
||||||
|
|
@ -1102,8 +1102,10 @@ procedure Gnatlink is
|
||||||
-- We will be looking for the static version of the library
|
-- We will be looking for the static version of the library
|
||||||
-- as it is in the same directory as the shared version.
|
-- as it is in the same directory as the shared version.
|
||||||
|
|
||||||
if Next_Line (Nlast - Library_Version'Length + 1 .. Nlast) =
|
if Nlast >= Library_Version'Length
|
||||||
Library_Version
|
and then Next_Line
|
||||||
|
(Nlast - Library_Version'Length + 1 .. Nlast)
|
||||||
|
= Library_Version
|
||||||
then
|
then
|
||||||
-- Set Last to point to last character before the
|
-- Set Last to point to last character before the
|
||||||
-- library version.
|
-- library version.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue