From: drh <> Date: Mon, 14 Oct 2024 18:43:04 +0000 (+0000) Subject: Avoid the possibility of buffer overrun in the READ_UTF8 macro by using X-Git-Tag: version-3.47.0~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4924847cb9bfa0d2ff99b325a125bdf78c17cbb6;p=thirdparty%2Fsqlite.git Avoid the possibility of buffer overrun in the READ_UTF8 macro by using an less-than operator rather than not-equal-to. FossilOrigin-Name: 20e60bf058c54bc818ea1b8ce54ace8bcd50699734713cef622bf79e49a9a279 --- diff --git a/ext/fts5/fts5_tokenize.c b/ext/fts5/fts5_tokenize.c index f92529b840..f9581b080c 100644 --- a/ext/fts5/fts5_tokenize.c +++ b/ext/fts5/fts5_tokenize.c @@ -198,7 +198,7 @@ static const unsigned char sqlite3Utf8Trans1[] = { c = *(zIn++); \ if( c>=0xc0 ){ \ c = sqlite3Utf8Trans1[c-0xc0]; \ - while( zIn!=zTerm && (*zIn & 0xc0)==0x80 ){ \ + while( zIn=0xc0 ){ \ c = sqlite3Utf8Trans1[c-0xc0]; \ - while( zIn!=zTerm && (*zIn & 0xc0)==0x80 ){ \ + while( zIn