diff options
Diffstat (limited to 'gcc/ada/s-fileio.adb')
-rw-r--r-- | gcc/ada/s-fileio.adb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/ada/s-fileio.adb b/gcc/ada/s-fileio.adb index 9028fd694ba..b60cce5215c 100644 --- a/gcc/ada/s-fileio.adb +++ b/gcc/ada/s-fileio.adb @@ -812,6 +812,10 @@ package body System.File_IO is -- Normal case of non-null name given else + if Name'Length > Namelen then + raise Name_Error; + end if; + Namestr (1 .. Name'Length) := Name; Namestr (Name'Length + 1) := ASCII.NUL; end if; |