## NULL Pointer (sqlite3_vfs_find)
```
SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfs){
...
#ifndef SQLITE_OMIT_AUTOINIT
int rc = sqlite3_initialize();
if( rc ) return 0; // NULL Pointer
#endif
...
return pVfs;
}
```
## NULL Pointer Deference
### sqlite3MemdbInit
```
SQLITE_PRIVATE int sqlite3MemdbInit(void){
sqlite3_vfs *pLower = sqlite3_vfs_find(0);
unsigned int sz = pLower->szOsFile; // NULL Pointer Deference
...
}
```
### sqlite3_appendvfs_init
```
int sqlite3_appendvfs_init(
sqlite3 *db,
char **pzErrMsg,
const sqlite3_api_routines *pApi
){
...
pOrig = sqlite3_vfs_find(0);
apnd_vfs.iVersion = pOrig->iVersion; // NULL Pointer Deference
apnd_vfs.pAppData = pOrig;
apnd_vfs.szOsFile = pOrig->szOsFile + sizeof(ApndFile); //NULL Pointer Deference
...
}
```
### timeOfDay
```
/* Return the current wall-clock time */
static sqlite3_int64 timeOfDay(void){
static sqlite3_vfs *clockVfs = 0;
sqlite3_int64 t;
if( clockVfs==0 ) clockVfs = sqlite3_vfs_find(0);
if( clockVfs->iVersion>=2 && clockVfs->xCurrentTimeInt64!=0 ){ // NULL Pointer Deference
clockVfs->xCurrentTimeInt64(clockVfs, &t);
}else{
double r;
clockVfs->xCurrentTime(clockVfs, &r); // NULL Pointer Deference
t = (sqlite3_int64)(r*86400000.0);
}
return t;
}
```