diff options
author | larrybr <larrybr@noemail.net> | 2023-04-28 00:28:06 +0000 |
---|---|---|
committer | larrybr <larrybr@noemail.net> | 2023-04-28 00:28:06 +0000 |
commit | fb016bf25733207d0875302bac7cfb27c7e901b9 (patch) | |
tree | d5794e82628ceebbf4e76429e85a9832dc85aeac /src/shell.c.in | |
parent | fe03773305fa7c52e26df3a5794475037fbf456a (diff) | |
download | sqlite-fb016bf25733207d0875302bac7cfb27c7e901b9.tar.gz sqlite-fb016bf25733207d0875302bac7cfb27c7e901b9.zip |
Make CLI .load slightly harder to abuse.
FossilOrigin-Name: 2779f9270cc431786d0e16ef05ec05b0f22dda2307f3bf17467ad0b25304e160
Diffstat (limited to 'src/shell.c.in')
-rw-r--r-- | src/shell.c.in | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shell.c.in b/src/shell.c.in index 18690214b..7285067be 100644 --- a/src/shell.c.in +++ b/src/shell.c.in @@ -9192,7 +9192,8 @@ static int do_meta_command(char *zLine, ShellState *p){ const char *zFile, *zProc; char *zErrMsg = 0; failIfSafeMode(p, "cannot run .load in safe mode"); - if( nArg<2 ){ + if( nArg<2 || azArg[1][0]==0 ){ + /* Must have a non-empty FILE. (Will not load self.) */ raw_printf(stderr, "Usage: .load FILE ?ENTRYPOINT?\n"); rc = 1; goto meta_command_exit; |