mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-05 04:30:38 +03:00
Make sure enough memory is allocated for pathological quoting cases when
computing a quoted table name in the command-line shell. FossilOrigin-Name: 0583b84ab444db3ae3c93db619b67bf84b0305ab989200e77214e02ff2dc923a
This commit is contained in:
@@ -2363,7 +2363,7 @@ static void set_table_name(ShellState *p, const char *zName){
|
||||
if( zName==0 ) return;
|
||||
cQuote = quoteChar(zName);
|
||||
n = strlen30(zName);
|
||||
if( cQuote ) n += 2;
|
||||
if( cQuote ) n += n+2;
|
||||
z = p->zDestTable = malloc( n+1 );
|
||||
if( z==0 ){
|
||||
raw_printf(stderr,"Error: out of memory\n");
|
||||
|
||||
Reference in New Issue
Block a user