diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/shell.c.in | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/shell.c.in b/src/shell.c.in index 2ef7045b9..8d65071e4 100644 --- a/src/shell.c.in +++ b/src/shell.c.in @@ -6241,7 +6241,9 @@ static int shell_dbinfo_command(ShellState *p, int nArg, char **azArg){ if( sqlite3_step(pStmt)==SQLITE_ROW && sqlite3_column_bytes(pStmt,0)>100 ){ - memcpy(aHdr, sqlite3_column_blob(pStmt,0), 100); + const u8 *pb = sqlite3_column_blob(pStmt,0); + shell_check_oom((void*)pb); + memcpy(aHdr, pb, 100); sqlite3_finalize(pStmt); }else{ raw_printf(stderr, "unable to read database header\n"); |