1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-10-24 09:53:10 +03:00

Be careful not to use the result of sqlite3_value_blob() after changing

the representation of an object.  Ticket #2290. (CVS 3834)

FossilOrigin-Name: e14374e4e6f14a90ecb53c2e7c86908a220c6d68
This commit is contained in:
drh
2007-04-10 13:51:17 +00:00
parent 6b6ab13353
commit 1eb2538a33
5 changed files with 29 additions and 14 deletions

View File

@@ -16,7 +16,7 @@
** sqliteRegisterBuildinFunctions() found at the bottom of the file.
** All other code has file scope.
**
** $Id: func.c,v 1.138 2007/03/17 17:52:42 drh Exp $
** $Id: func.c,v 1.139 2007/04/10 13:51:18 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -656,8 +656,8 @@ static void hexFunc(
const unsigned char *pBlob;
char *zHex, *z;
assert( argc==1 );
pBlob = sqlite3_value_blob(argv[0]);
n = sqlite3_value_bytes(argv[0]);
pBlob = sqlite3_value_blob(argv[0]);
z = zHex = sqlite3_malloc(n*2 + 1);
if( zHex==0 ) return;
for(i=0; i<n; i++, pBlob++){