SQLite
Check-in [ac15455a]
Not logged in
Overview
SHA1:ac15455abcb9bdb88b53129348668a1442f6899f
Date: 2014-01-13 20:38:35
User: drh
Comment:In the command-line shell, defend against a NULL-pointer dereference in the case where sqlite3_column_name() returns NULL (as might happen following an OOM error).
Tags And Properties
Context
2014-01-14
10:17
[1e131094] For the Win32 VFS, defining winShmMutexHeld should be controlled by NDEBUG, not SQLITE_DEBUG. (user: mistachkin, tags: trunk)
2014-01-13
20:38
[ac15455a] In the command-line shell, defend against a NULL-pointer dereference in the case where sqlite3_column_name() returns NULL (as might happen following an OOM error). (user: drh, tags: trunk)
20:32
[260587d2] For statements of just an unadorned VALUES clause, assign column names as "columnN" for increasing whole numbers N. (user: drh, tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/shell.c.

593
594
595
596
597
598
599

600
601
602
603
604
605
606

/*
** Output the given string with characters that are special to
** HTML escaped.
*/
static void output_html_string(FILE *out, const char *z){
  int i;

  while( *z ){
    for(i=0;   z[i] 
            && z[i]!='<' 
            && z[i]!='&' 
            && z[i]!='>' 
            && z[i]!='\"' 
            && z[i]!='\'';







>







593
594
595
596
597
598
599
600
601
602
603
604
605
606
607

/*
** Output the given string with characters that are special to
** HTML escaped.
*/
static void output_html_string(FILE *out, const char *z){
  int i;
  if( z==0 ) z = "";
  while( *z ){
    for(i=0;   z[i] 
            && z[i]!='<' 
            && z[i]!='&' 
            && z[i]!='>' 
            && z[i]!='\"' 
            && z[i]!='\'';