diff options
author | Brian Drummond <brian@shapes.demon.co.uk> | 2013-12-13 21:06:23 +0000 |
---|---|---|
committer | Brian Drummond <brian@shapes.demon.co.uk> | 2013-12-13 21:06:23 +0000 |
commit | fdaa2e090f2e9896485327731389b3f8098e8d8d (patch) | |
tree | 941f65b89b676f62c2fd1c25e5b852d00483426d /translate/grt | |
parent | e82419417d9e1ba71abce620f7633b81d0a0d1ce (diff) | |
download | ghdl-fdaa2e090f2e9896485327731389b3f8098e8d8d.tar.gz ghdl-fdaa2e090f2e9896485327731389b3f8098e8d8d.tar.bz2 ghdl-fdaa2e090f2e9896485327731389b3f8098e8d8d.zip |
Patch for stack size limit test, https://gna.org/bugs/index.php?16463
Diffstat (limited to 'translate/grt')
-rw-r--r-- | translate/grt/grt-options.adb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/translate/grt/grt-options.adb b/translate/grt/grt-options.adb index 6d7384342..138c31dd9 100644 --- a/translate/grt/grt-options.adb +++ b/translate/grt/grt-options.adb @@ -217,7 +217,12 @@ package body Grt.Options is end if; if Pos > Str'Last then -- No suffix. - return Natural (Val); + if Val > Integer_64(Natural'Last) then + Error_C ("Size exceeds limit for option "); + Error_E (Option_Name); + else + return Natural (Val); + end if; end if; if Pos = Str'Last or else (Pos + 1 = Str'Last |