SQLite
Check-in [e018f4bf]
Not logged in
Overview
SHA1:e018f4bf1f27f7838342940ad89a12d7f1536e8e
Date: 2015-04-15 19:25:25
User: drh
Comment:Fix a potential one-byte buffer overread in the command-line shell.
Tags And Properties
Context
2015-04-16
00:26
[d3c00d61] When parsing the schema, ignore any SQL that does not begin with "CREATE". (user: drh, tags: trunk)
2015-04-15
19:25
[e018f4bf] Fix a potential one-byte buffer overread in the command-line shell. (user: drh, tags: trunk)
17:26
[f71053cf] Prevent the fetchPayload() routine from reporting a cell size that extends off the end of the page on a pathologically corrupted database file. (user: drh, tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/shell.c.

1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
**    \\    -> backslash
*/
static void resolve_backslashes(char *z){
  int i, j;
  char c;
  while( *z && *z!='\\' ) z++;
  for(i=j=0; (c = z[i])!=0; i++, j++){
    if( c=='\\' ){
      c = z[++i];
      if( c=='n' ){
        c = '\n';
      }else if( c=='t' ){
        c = '\t';
      }else if( c=='r' ){
        c = '\r';







|







1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
**    \\    -> backslash
*/
static void resolve_backslashes(char *z){
  int i, j;
  char c;
  while( *z && *z!='\\' ) z++;
  for(i=j=0; (c = z[i])!=0; i++, j++){
    if( c=='\\' && z[i+1]!=0 ){
      c = z[++i];
      if( c=='n' ){
        c = '\n';
      }else if( c=='t' ){
        c = '\t';
      }else if( c=='r' ){
        c = '\r';