diff options
author | drh <drh@noemail.net> | 2020-01-08 12:17:46 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2020-01-08 12:17:46 +0000 |
commit | 87969b2a1190584c09f8676e3a17c2acaa99227c (patch) | |
tree | a56b212038353b07978f423f64b41c660e6ffe09 /src/util.c | |
parent | ded33ccea4203e0b3c7519c9c60063632bf4eccf (diff) | |
download | sqlite-87969b2a1190584c09f8676e3a17c2acaa99227c.tar.gz sqlite-87969b2a1190584c09f8676e3a17c2acaa99227c.zip |
When doing a test-to-double conversion on a BLOB with an odd number of bytes
and assuming a UTF16 encoding, ignore the last byte.
Ticket [9eda2697f5cc1aba].
FossilOrigin-Name: 1c76f1d8ec0937a2d2e4ce75f98494c953e9621db31945d7e44f45d90d1c3892
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c index f7a993a76..88ac6d39f 100644 --- a/src/util.c +++ b/src/util.c @@ -411,6 +411,7 @@ int sqlite3AtoF(const char *z, double *pResult, int length, u8 enc){ }else{ int i; incr = 2; + length &= ~1; assert( SQLITE_UTF16LE==2 && SQLITE_UTF16BE==3 ); testcase( enc==SQLITE_UTF16LE ); testcase( enc==SQLITE_UTF16BE ); |