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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user