1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

New test cases and fixes for minor problems.

FossilOrigin-Name: e0da2cc382e0db33d0423372133115f52c77bd0093dbf816c7e88a0aad5f6582
This commit is contained in:
drh
2018-01-03 23:40:02 +00:00
parent 99abe5c478
commit a5bb43518b
5 changed files with 116 additions and 11 deletions

View File

@@ -2442,11 +2442,11 @@ static int SQLITE_TCLAPI DbObjCmd(
}
pBA = Tcl_GetByteArrayFromObj(pValue, &len);
pData = sqlite3_malloc64( len );
if( pData==0 ){
if( pData==0 && len>0 ){
Tcl_AppendResult(interp, "out of memory", (char*)0);
rc = TCL_ERROR;
}else{
memcpy(pData, pBA, len);
if( len>0 ) memcpy(pData, pBA, len);
xrc = sqlite3_deserialize(pDb->db, zSchema, pData, len, len,
SQLITE_DESERIALIZE_FREEONCLOSE |
SQLITE_DESERIALIZE_RESIZEABLE);