From 5818045553c282c9cc305a6361a416def3039c8d Mon Sep 17 00:00:00 2001 From: openharmony_ci <120357966@qq.com> Date: Fri, 4 Aug 2023 03:22:17 +0000 Subject: [PATCH] =?UTF-8?q?!74=20=E4=BF=AE=E5=A4=8Dsqlite=20=E6=BC=8F?= =?UTF-8?q?=E6=B4=9ECVE-2023-36191=20Merge=20pull=20request=20!74=20from?= =?UTF-8?q?=20SloveZT/master?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/shell.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/shell.c b/src/shell.c index 26c0ae5..6308cd3 100644 --- a/src/shell.c +++ b/src/shell.c @@ -22527,8 +22527,12 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){ }else if( strcmp(z,"-bail")==0 ){ bail_on_error = 1; }else if( strcmp(z,"-nonce")==0 ){ - free(data.zNonce); - data.zNonce = strdup(argv[++i]); + if( data.zNonce ) free(data.zNonce); + if( i+1 < argc ) data.zNonce = strdup(argv[++i]); + else{ + data.zNonce = 0; + break; + } }else if( strcmp(z,"-safe")==0 ){ /* no-op - catch this on the second pass */ } -- Gitee