mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-01 06:27:03 +03:00
Prevent buffer overruns when converting malformed UTF16 to UTF8. Ticket #3482. (CVS 5869)
FossilOrigin-Name: 3f657e88767f60d305dd6151e7aa54363341d052
This commit is contained in:
@ -14,7 +14,7 @@
|
||||
# that all strings passed to that function are aligned on an even
|
||||
# byte boundary.
|
||||
#
|
||||
# $Id: utf16align.test,v 1.1 2006/02/16 18:16:38 drh Exp $
|
||||
# $Id: utf16align.test,v 1.2 2008/11/07 03:29:34 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -81,4 +81,15 @@ do_test utf16align-1.3 {
|
||||
} 0
|
||||
integrity_check utf16align-1.4
|
||||
|
||||
# ticket #3482
|
||||
#
|
||||
db close
|
||||
sqlite3 db :memory:
|
||||
do_test utf16align-2.1 {
|
||||
db eval {
|
||||
PRAGMA encoding=UTF16be;
|
||||
SELECT hex(ltrim(x'6efcda'));
|
||||
}
|
||||
} {6EFC}
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user