From e53cf90579703fb92d460abc12201925290b38e1 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 4 Jun 2019 04:13:24 +0200 Subject: ghdldrv: reject empty argument. Fix #830 --- src/ghdldrv/ghdlmain.adb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/ghdldrv') 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 -- cgit v1.2.3