SQLite

Check-in [ad6aae76]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Minor code change in the CLI to make a UAF warning from scan-build go away.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: ad6aae768ad0816bfd1c8e9db5c0153226982d3af9a089f31e608223339e9829
User & Date: drh 2023-05-02 00:33:45
Context
2023-05-02
10:22
Fix typo in comment. Forum post 3da7d9c445. (check-in: 41a8a15c user: drh tags: trunk)
00:33
Minor code change in the CLI to make a UAF warning from scan-build go away. (check-in: ad6aae76 user: drh tags: trunk)
2023-05-01
20:42
Fix harmless compiler warnings. (check-in: 342af5b4 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/shell.c.in.
990
991
992
993
994
995
996

997
998
999
1000
1001
1002
1003
  }else{
    zPrompt = isContinuation ? CONTINUATION_PROMPT : mainPrompt;
#if SHELL_USE_LOCAL_GETLINE
    printf("%s", zPrompt);
    fflush(stdout);
    do{
      zResult = local_getline(zPrior, stdin);

      /* ^C trap creates a false EOF, so let "interrupt" thread catch up. */
      if( zResult==0 ) sqlite3_sleep(50);
    }while( zResult==0 && seenInterrupt>0 );
#else
    free(zPrior);
    zResult = shell_readline(zPrompt);
    while( zResult==0 ){







>







990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
  }else{
    zPrompt = isContinuation ? CONTINUATION_PROMPT : mainPrompt;
#if SHELL_USE_LOCAL_GETLINE
    printf("%s", zPrompt);
    fflush(stdout);
    do{
      zResult = local_getline(zPrior, stdin);
      zPrior = 0;
      /* ^C trap creates a false EOF, so let "interrupt" thread catch up. */
      if( zResult==0 ) sqlite3_sleep(50);
    }while( zResult==0 && seenInterrupt>0 );
#else
    free(zPrior);
    zResult = shell_readline(zPrompt);
    while( zResult==0 ){