diff options
author | drh <> | 2024-10-14 18:43:04 +0000 |
---|---|---|
committer | drh <> | 2024-10-14 18:43:04 +0000 |
commit | 4924847cb9bfa0d2ff99b325a125bdf78c17cbb6 (patch) | |
tree | 66a15ac1db11db01dd3259ef4f0ffceba7b57e0b /src | |
parent | 5899d9c08f1291584f6b5799402d847b2ce051d1 (diff) | |
download | sqlite-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 \ |