aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-parse.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/vhdl/vhdl-parse.adb')
-rw-r--r--src/vhdl/vhdl-parse.adb9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/vhdl/vhdl-parse.adb b/src/vhdl/vhdl-parse.adb
index 48c6de4c9..0266a494e 100644
--- a/src/vhdl/vhdl-parse.adb
+++ b/src/vhdl/vhdl-parse.adb
@@ -6320,7 +6320,14 @@ package body Vhdl.Parse is
Scan;
-- Resize.
- Resize_Bit_String (Res, Nat32 (Int));
+ if Int > 2048 then
+ -- What is a reasonable limit ?
+ Error_Msg_Parse
+ (Get_Token_Location,
+ "bit string size is too large (> 2048)");
+ else
+ Resize_Bit_String (Res, Nat32 (Int));
+ end if;
else
Error_Msg_Parse
(Get_Token_Location,