diff options
| author | Tristan Gingold <tgingold@free.fr> | 2019-06-04 04:13:24 +0200 |
|---|---|---|
| committer | Tristan Gingold <tgingold@free.fr> | 2019-06-04 04:14:34 +0200 |
| commit | e53cf90579703fb92d460abc12201925290b38e1 (patch) | |
| tree | 3245fd7813eadeed2ce4bf6bb149af94d0097b90 /src | |
| parent | a04de83f55e62365ca7e0fc371889d0c39198d77 (diff) | |
| download | ghdl-e53cf90579703fb92d460abc12201925290b38e1.tar.gz ghdl-e53cf90579703fb92d460abc12201925290b38e1.tar.bz2 ghdl-e53cf90579703fb92d460abc12201925290b38e1.zip | |
ghdldrv: reject empty argument. Fix #830
Diffstat (limited to 'src')
| -rw-r--r-- | src/ghdldrv/ghdlmain.adb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ghdldrv/ghdlmain.adb b/src/ghdldrv/ghdlmain.adb index 1b849c75c..402565b9e 100644 --- a/src/ghdldrv/ghdlmain.adb +++ b/src/ghdldrv/ghdlmain.adb @@ -296,6 +296,11 @@ package body Ghdlmain is for I in Args'Range loop Args (I) := new String'(Argument (I)); pragma Assert (Args (I)'First = 1); + if Args (I)'Last < 1 then + Error ("empty argument on the command line (#" + & Natural'Image (I) & ")"); + raise Option_Error; + end if; end loop; -- Expand response files |
