aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2022-10-27 18:20:08 +0000
committerdrh <>2022-10-27 18:20:08 +0000
commit4853aa18f0a01decd150a95c7dd911d87ea1fb90 (patch)
tree8b84837ed5e7d05d0501fcbdcd532b9f0584f39e /src
parentf7fea5b4b8097b3a564cd9c5938e98d4619df713 (diff)
downloadsqlite-4853aa18f0a01decd150a95c7dd911d87ea1fb90.tar.gz
sqlite-4853aa18f0a01decd150a95c7dd911d87ea1fb90.zip
In the CLI, ensure that input to utf8_width_print is not NULL, or if it is,
change it to an empty string. For for the problem reported by [forum:/forumpost/2961cf13eec61876|forum post 2961cf13eec61876]. FossilOrigin-Name: 9ecc9d25ea62a7777bbf621989a5c577b612784121a20465cda4d4023fa9634d
Diffstat (limited to 'src')
-rw-r--r--src/shell.c.in1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/shell.c.in b/src/shell.c.in
index b1cfe9d5b..cbac2a730 100644
--- a/src/shell.c.in
+++ b/src/shell.c.in
@@ -549,6 +549,7 @@ static void utf8_width_print(FILE *pOut, int w, const char *zUtf){
int i;
int n;
int aw = w<0 ? -w : w;
+ if( zUtf==0 ) zUtf = "";
for(i=n=0; zUtf[i]; i++){
if( (zUtf[i]&0xc0)!=0x80 ){
n++;