2018-07-31 Arnaud Charlet <charlet@adacore.com>
gcc/ada/
* gnatlink.adb: Fix potential Constraint_Error if
Library_Version is too long.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263107
138bc75d-0d04-0410-961f-
82ee72b054a4
+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>
* sem_elab.adb: Remove duplicate condition detected by CodePeer.
-- We will be looking for the static version of the library
-- as it is in the same directory as the shared version.
- if Next_Line (Nlast - Library_Version'Length + 1 .. Nlast) =
- Library_Version
+ if Nlast >= Library_Version'Length
+ and then Next_Line
+ (Nlast - Library_Version'Length + 1 .. Nlast)
+ = Library_Version
then
-- Set Last to point to last character before the
-- library version.