SQLite

Check-in [68f5ddddf0]
Login

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

Overview
Comment:Remove an instance of sprintf() from the VM implementation. SQLite should not use sprintf() from the C library - it has its own implementation. (CVS 4800)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 68f5ddddf0d1b5c8ed97dda0a32362a55637b5f2
User & Date: drh 2008-02-19 18:28:14.000
Context
2008-02-19
18:29
Remove instances of strcpy() from test code. Use memcpy() or sqlite3_snprintf() instead. (CVS 4801) (check-in: 7b50140dc0 user: drh tags: trunk)
18:28
Remove an instance of sprintf() from the VM implementation. SQLite should not use sprintf() from the C library - it has its own implementation. (CVS 4800) (check-in: 68f5ddddf0 user: drh tags: trunk)
15:44
Avoid the use of UTF16 functions in code that is part of a build when UTF16 support is omitted. Ticket #2949. (CVS 4799) (check-in: 9db346dede user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/vdbeaux.c.
838
839
840
841
842
843
844
845
846
847
848
849

850
851
852
853
854
855
856
857
      pMem->n = strlen(pMem->z);
      pMem->enc = SQLITE_UTF8;
    }
    pMem->type = SQLITE_TEXT;
    pMem++;

    if( p->explain==1 ){
      if( sqlite3VdbeMemGrow(pMem, 32, 0) ){
        p->db->mallocFailed = 1;
        return SQLITE_NOMEM;
      }
      pMem->flags = MEM_Dyn|MEM_Str|MEM_Term;

      pMem->n = sprintf(pMem->z, "%.2x", pOp->p5);   /* P5 */
      pMem->type = SQLITE_TEXT;
      pMem->enc = SQLITE_UTF8;
      pMem++;
  
#ifdef SQLITE_DEBUG
      if( pOp->zComment ){
        pMem->flags = MEM_Str|MEM_Term;







|




>
|







838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
      pMem->n = strlen(pMem->z);
      pMem->enc = SQLITE_UTF8;
    }
    pMem->type = SQLITE_TEXT;
    pMem++;

    if( p->explain==1 ){
      if( sqlite3VdbeMemGrow(pMem, 4, 0) ){
        p->db->mallocFailed = 1;
        return SQLITE_NOMEM;
      }
      pMem->flags = MEM_Dyn|MEM_Str|MEM_Term;
      pMem->n = 2;
      sqlite3_snprintf(3, pMem->z, "%.2x", pOp->p5);   /* P5 */
      pMem->type = SQLITE_TEXT;
      pMem->enc = SQLITE_UTF8;
      pMem++;
  
#ifdef SQLITE_DEBUG
      if( pOp->zComment ){
        pMem->flags = MEM_Str|MEM_Term;