From cee98b4ced6efc30f6f161d6b74acadff7e01c0e Mon Sep 17 00:00:00 2001 From: drh <> Date: Sat, 29 Nov 2025 18:18:15 +0000 Subject: [PATCH] Handle empty string values in columnar modes without NULL pointer dereferences. FossilOrigin-Name: 7927dbc5ebc76233325e45bd24181dbc5c3636e271f9352cf530f41dad6ba66d --- ext/qrf/qrf.c | 8 ++++++-- manifest | 14 +++++++------- manifest.uuid | 2 +- test/qrf01.test | 11 +++++++++++ 4 files changed, 25 insertions(+), 10 deletions(-) diff --git a/ext/qrf/qrf.c b/ext/qrf/qrf.c index 846f7652c5..172b56ee22 100644 --- a/ext/qrf/qrf.c +++ b/ext/qrf/qrf.c @@ -577,11 +577,14 @@ static int qrfDisplayLength(const char *zIn){ ** it will need to be split. */ static int qrfDisplayWidth(const char *zIn, sqlite3_int64 nByte, int *pnNL){ - const unsigned char *z = (const unsigned char*)zIn; - const unsigned char *zEnd = &z[nByte]; + const unsigned char *z; + const unsigned char *zEnd; int mx = 0; int n = 0; int nNL = 0; + if( zIn==0 ) zIn = ""; + z = (const unsigned char*)zIn; + zEnd = &z[nByte]; while( z