1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Cause sqlite3_exec() to return SQLITE_NOMEM if it cannot allocate memory to

hold the error message for some other error. (CVS 6844)

FossilOrigin-Name: e9849292ab741f4c86203b2629dbe116f9b527c8
This commit is contained in:
drh
2009-07-03 19:18:43 +00:00
parent ee152b00a3
commit 6bef648d97
3 changed files with 10 additions and 8 deletions

View File

@@ -14,7 +14,7 @@
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: legacy.c,v 1.33 2009/05/05 20:02:48 drh Exp $
** $Id: legacy.c,v 1.34 2009/07/03 19:18:43 drh Exp $
*/
#include "sqliteInt.h"
@@ -132,6 +132,8 @@ exec_out:
*pzErrMsg = sqlite3Malloc(nErrMsg);
if( *pzErrMsg ){
memcpy(*pzErrMsg, sqlite3_errmsg(db), nErrMsg);
}else{
rc = SQLITE_NOMEM;
}
}else if( pzErrMsg ){
*pzErrMsg = 0;