mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Have the debug version of sqliteRealloc() return partially uninitialised
memory in the same way as the non-debug version can. (CVS 1783) FossilOrigin-Name: e78b0ff30fb630bc9835a7545525eea64924bafc
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
** This file contains functions for allocating memory, comparing
|
||||
** strings, and stuff like that.
|
||||
**
|
||||
** $Id: util.c,v 1.109 2004/06/30 04:02:12 drh Exp $
|
||||
** $Id: util.c,v 1.110 2004/06/30 12:49:46 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <stdarg.h>
|
||||
@@ -202,7 +202,7 @@ void *sqlite3Realloc_(void *oldP, int n, char *zFile, int line){
|
||||
p = &pi[N_GUARD+1];
|
||||
memcpy(p, oldP, n>oldN ? oldN : n);
|
||||
if( n>oldN ){
|
||||
memset(&((char*)p)[oldN], 0, n-oldN);
|
||||
memset(&((char*)p)[oldN], 0x55, n-oldN);
|
||||
}
|
||||
memset(oldPi, 0xab, (oldK+N_GUARD+2)*sizeof(int));
|
||||
free(oldPi);
|
||||
|
||||
Reference in New Issue
Block a user