From: drh <> Date: Sat, 29 Nov 2025 18:18:15 +0000 (+0000) Subject: Handle empty string values in columnar modes without NULL pointer X-Git-Tag: artiphishell~154 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cee98b4ced6efc30f6f161d6b74acadff7e01c0e;p=thirdparty%2Fsqlite.git Handle empty string values in columnar modes without NULL pointer dereferences. FossilOrigin-Name: 7927dbc5ebc76233325e45bd24181dbc5c3636e271f9352cf530f41dad6ba66d --- 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