From 4924847cb9bfa0d2ff99b325a125bdf78c17cbb6 Mon Sep 17 00:00:00 2001 From: drh <> Date: Mon, 14 Oct 2024 18:43:04 +0000 Subject: [PATCH] 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 --- ext/fts5/fts5_tokenize.c | 2 +- manifest | 14 +++++++------- manifest.uuid | 2 +- src/utf.c | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) 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