Hi,

In file shell.c
static char *readFile(const char *zName, int *pnByte){ FILE *in = fopen(zName, 
"rb”); // == allocate fd in long nIn; size_t nRead; char *pBuf; if( in==0 ) 
return 0; fseek(in, 0, SEEK_END); nIn = ftell(in); rewind(in); pBuf = 
sqlite3_malloc64( nIn+1 ); // == try to allocate memory if( pBuf==0 ) return 0; 
// == check return value, if memory allocation failed, fd in will leak
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to