Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Detect the failure to zero-terminate a result string due to a malloc failure. (CVS 4871) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
57db14067ff7d519291bebe695dcf991 |
User & Date: | drh 2008-03-17 16:54:02.000 |
Context
2008-03-17
| ||
17:08 | Abandon the OR optimization following a memory allocation failure, to avoid referencing uninitialized memory. (CVS 4872) (check-in: 9d2afbb543 user: drh tags: trunk) | |
16:54 | Detect the failure to zero-terminate a result string due to a malloc failure. (CVS 4871) (check-in: 57db14067f user: drh tags: trunk) | |
16:23 | Label test case bindxfer-1.9 as a misuse test case, since it is one. (CVS 4870) (check-in: 7b99122632 user: drh tags: trunk) | |
Changes
Changes to src/vdbe.c.
︙ | ︙ | |||
39 40 41 42 43 44 45 | ** ** Various scripts scan this source file in order to generate HTML ** documentation, headers files, or other derived files. The formatting ** of the code in this file is, therefore, important. See other comments ** in this file for details. If in doubt, do not deviate from existing ** commenting and indentation practices when changing or adding code. ** | | | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | ** ** Various scripts scan this source file in order to generate HTML ** documentation, headers files, or other derived files. The formatting ** of the code in this file is, therefore, important. See other comments ** in this file for details. If in doubt, do not deviate from existing ** commenting and indentation practices when changing or adding code. ** ** $Id: vdbe.c,v 1.710 2008/03/17 16:54:02 drh Exp $ */ #include "sqliteInt.h" #include <ctype.h> #include "vdbeInt.h" /* ** The following global variable is incremented every time a cursor |
︙ | ︙ | |||
981 982 983 984 985 986 987 988 989 990 991 992 993 994 | ** as side effect. */ pMem = p->pResultSet = &p->aMem[pOp->p1]; for(i=0; i<pOp->p2; i++){ sqlite3VdbeMemNulTerminate(&pMem[i]); storeTypeInfo(&pMem[i], encoding); } /* Return SQLITE_ROW */ p->nCallback++; p->pc = pc + 1; rc = SQLITE_ROW; goto vdbe_return; | > | 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 | ** as side effect. */ pMem = p->pResultSet = &p->aMem[pOp->p1]; for(i=0; i<pOp->p2; i++){ sqlite3VdbeMemNulTerminate(&pMem[i]); storeTypeInfo(&pMem[i], encoding); } if( db->mallocFailed ) goto no_mem; /* Return SQLITE_ROW */ p->nCallback++; p->pc = pc + 1; rc = SQLITE_ROW; goto vdbe_return; |
︙ | ︙ |