aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2024-10-14 18:43:04 +0000
committerdrh <>2024-10-14 18:43:04 +0000
commit4924847cb9bfa0d2ff99b325a125bdf78c17cbb6 (patch)
tree66a15ac1db11db01dd3259ef4f0ffceba7b57e0b /src
parent5899d9c08f1291584f6b5799402d847b2ce051d1 (diff)
downloadsqlite-4924847cb9bfa0d2ff99b325a125bdf78c17cbb6.tar.gz
sqlite-4924847cb9bfa0d2ff99b325a125bdf78c17cbb6.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/utf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utf.c b/src/utf.c
index 083ada788..c934bb234 100644
--- a/src/utf.c
+++ b/src/utf.c
@@ -136,7 +136,7 @@ static const unsigned char sqlite3Utf8Trans1[] = {
c = *(zIn++); \
if( c>=0xc0 ){ \
c = sqlite3Utf8Trans1[c-0xc0]; \
- while( zIn!=zTerm && (*zIn & 0xc0)==0x80 ){ \
+ while( zIn<zTerm && (*zIn & 0xc0)==0x80 ){ \
c = (c<<6) + (0x3f & *(zIn++)); \
} \
if( c<0x80 \