aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/s-fileio.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2013-04-12 15:03:19 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2013-04-12 15:03:19 +0200
commit9686dbc79e2904ce4047003d78e30c7056321151 (patch)
treeb152f6a9f24a5fee00b80c213619b2bd6c89f774 /gcc/ada/s-fileio.adb
parent7a1f094d68561273f94f0934f5fad6c283375b3d (diff)
downloadgcc-9686dbc79e2904ce4047003d78e30c7056321151.zip
gcc-9686dbc79e2904ce4047003d78e30c7056321151.tar.gz
gcc-9686dbc79e2904ce4047003d78e30c7056321151.tar.bz2
[multiple changes]
2013-04-12 Robert Dewar <dewar@adacore.com> * sem.ads, opt.ads: Minor comment edits. * sem_warn.adb, sem_ch6.adb: Minor reformatting. 2013-04-12 Claire Dross <dross@adacore.com> * a-cfdlli.adb a-cfdlli.ads (List, Not_No_Element, Iterate, Reverse_Iterate, Query_Element, Update_Element, Read, Write): Removed, not suitable for formal analysis. 2013-04-12 Ed Schonberg <schonberg@adacore.com> * sem_prag.adb (Analyze_Abstract_State): Use Defining entity to locate package entity, which may be a child unit. 2013-04-12 Thomas Quinot <quinot@adacore.com> * g-socket.adb, g-socket.ads (Connect_Socket, version with timeout): If the specified timeout is 0, do not attempt to determine whether the connection succeeded. 2013-04-12 Doug Rupp <rupp@adacore.com> * s-fileio.adb (Form_RMS Context_Key): Fix some thinkos. From-SVN: r197904
Diffstat (limited to 'gcc/ada/s-fileio.adb')
-rw-r--r--gcc/ada/s-fileio.adb8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/ada/s-fileio.adb b/gcc/ada/s-fileio.adb
index a9e04e8..32f0c90 100644
--- a/gcc/ada/s-fileio.adb
+++ b/gcc/ada/s-fileio.adb
@@ -696,12 +696,14 @@ package body System.File_IO is
Klen := KImage'Length;
To_Lower (KImage);
- if Form (Index .. Index + Klen - 1) = KImage then
+ if Index + Klen - 1 <= Form'Last and then
+ Form (Index .. Index + Klen - 1) = KImage
+ then
case Parm is
when Force_Record_Mode =>
VMS_Form (Pos) := '"';
Pos := Pos + 1;
- VMS_Form (Pos .. Pos + 7) := "ctx=rec";
+ VMS_Form (Pos .. Pos + 6) := "ctx=rec";
Pos := Pos + 7;
VMS_Form (Pos) := '"';
Pos := Pos + 1;
@@ -711,7 +713,7 @@ package body System.File_IO is
when Force_Stream_Mode =>
VMS_Form (Pos) := '"';
Pos := Pos + 1;
- VMS_Form (Pos .. Pos + 7) := "ctx=stm";
+ VMS_Form (Pos .. Pos + 6) := "ctx=stm";
Pos := Pos + 7;
VMS_Form (Pos) := '"';
Pos := Pos + 1;