Lines Matching defs:buffer

65 **    PREVENTS-HARMLESS-OVERREAD  - This branch prevents a buffer overread
1137 ** in the unread portions of the buffer with zeros. A VFS that
1588 ** as a normal, nul-terminated, UTF-8 buffer containing the filename, but
1736 ** output buffer xFullPathname. The exact size of the output buffer
1737 ** is also passed as a parameter to both methods. If the output buffer
2207 ** a page cache line is larger than sz bytes or if all of the pMem buffer
2218 ** <dd> ^The SQLITE_CONFIG_HEAP option specifies a static memory buffer
2226 ** the number of bytes in the memory buffer, and the minimum allocation size.
2266 ** size of each lookaside buffer slot and the second is the number of
2345 ** points to a buffer containing the name of the main database file. If the
2484 ** pointer to a memory buffer to use for lookaside memory.
2487 ** lookaside buffer itself using [sqlite3_malloc()]. ^The second argument is the
2488 ** size of each lookaside buffer slot. ^The third argument is the number of
2489 ** slots. The size of the buffer in the first argument must be greater than
2490 ** or equal to the product of the second and third arguments. The buffer
3215 ** buffer supplied as the second parameter whose size is given by
3220 ** returns a pointer to its buffer instead of the number of
3221 ** characters actually written into the buffer.)^ We admit that
3226 ** ^As long as the buffer size is greater than zero, sqlite3_snprintf()
3227 ** guarantees that the buffer is always zero-terminated. ^The first
3228 ** parameter "n" is the total size of the buffer, including space for
3282 ** of the prior allocation are copied into the beginning of buffer returned
3358 ** ^A call to this routine stores N bytes of randomness into buffer P.
5404 ** not invalidate a prior pointer, though of course the content of the buffer
5986 ** the same buffer is returned. Sqlite3_aggregate_context() is normally
7955 ** caller-supplied buffer. N bytes of data are copied into buffer Z
7984 ** caller-supplied buffer. N bytes of data are copied from the buffer Z
8537 ** and returns a pointer to a memory buffer obtained from [sqlite3_malloc64()]
8692 ** buffer and where forced to overflow to [sqlite3_malloc()]. The
9035 ** internal buffer by SQLite within the call to [sqlite3_config]. Hence
9104 ** pointer to a buffer of szPage bytes used to store the content of a
9114 ** implementation must return a pointer to the page buffer with its content
9611 ** a fixed-length buffer on the stack. If the log message is longer than
9613 ** buffer.
10778 ** the buffer P, which might be larger than N. If M is larger than N, and
10784 ** invoke sqlite3_free() on the serialization buffer when the database
10786 ** SQLite will try to increase the buffer size using sqlite3_realloc64()
10809 sqlite3_int64 szBuf, /* Total size of buffer pData[] */
11222 ** set *ppChangeset to point to a buffer containing the changeset
11261 ** the caller to eventually free the buffer that *ppChangeset points to using
11323 int *pnChangeset, /* OUT: Size of buffer at *ppChangeset */
11396 ** may be set to point to a buffer containing an English language error
11397 ** message. It is the responsibility of the caller to free this buffer using
11439 int *pnPatchset, /* OUT: Size of buffer at *ppPatchset */
11488 ** by passing it to [sqlite3changeset_finalize()]. The buffer containing the
11555 ** codes include SQLITE_CORRUPT (if the changeset buffer is corrupt) or
11579 ** the name of the table affected by the current change. The buffer remains
11790 ** If successful, a pointer to a buffer containing the inverted changeset
11791 ** is stored in *ppOut, the size of the same buffer is stored in *pnOut, and
11796 ** on the *ppOut pointer to free the buffer allocation following a successful
11834 int nA, /* Number of bytes in buffer pA */
11835 void *pA, /* Pointer to buffer containing changeset A */
11836 int nB, /* Number of bytes in buffer pB */
11837 void *pB, /* Pointer to buffer containing changeset B */
11893 ** Add all changes within the changeset (or patchset) in buffer pData (size
11896 ** If the buffer contains a patchset, then all prior calls to this function
11898 ** the buffer contains a changeset, so must have the earlier calls to this
11971 ** Obtain a buffer containing a changeset (or patchset) representing the
11988 ** pointer to the output buffer, respectively. In this case it is the
11989 ** responsibility of the caller to eventually free the buffer using a
11994 int *pnData, /* OUT: Size of output buffer in bytes */
11995 void **ppData /* OUT: Pointer to output buffer */
12148 ** sqlite3_rebaser APIs buffer before returning. In this case (*pnRebase)
12149 ** is set to the size of the buffer in bytes. It is the responsibility of the
12150 ** caller to eventually free any such buffer using sqlite3_free(). The buffer
12397 ** the buffer of rebase information captured. Then:
12402 ** <li> The new object is configured with the rebase buffer obtained from
12431 ** to the conflict resolutions described by buffer pRebase (size nRebase
12444 ** Argument pIn must point to a buffer containing a changeset nIn bytes
12445 ** in size. This function allocates and populates a buffer with a copy
12448 ** is set to point to the new buffer containing the rebased changeset and
12450 ** responsibility of the caller to eventually free the new buffer using
12488 ** require that the entire changeset be stored in a single buffer in memory.
12490 ** a pointer to a single large buffer allocated using sqlite3_malloc().
12495 ** In order to avoid this problem, instead of a single large buffer, input
12514 ** argument, pData, points to a buffer (*pnData) bytes in size. Assuming no
12516 ** into the buffer and set (*pnData) to the actual number of bytes copied
12531 ** pointer to a single large buffer. In this case, a pair of parameters such
12549 ** points to a buffer nData bytes in size containing the chunk of output
12784 ** current document. If successful, (*pz) is set to point to a buffer
12786 ** (not characters) of the buffer and SQLITE_OK is returned. Otherwise,
13064 ** arguments are a pointer to a buffer containing the token text, and the
13079 ** input buffer is exhausted, xTokenize() should return SQLITE_OK. Finally,
13203 const char *pToken, /* Pointer to buffer containing token */
14275 ** number of pages. A negative number N translations means that a buffer
14462 ** In other words, S is a buffer and E is a pointer to the first byte after
14463 ** the end of buffer S. This macro returns true if P points to something
14464 ** contained within the buffer S.
14708 ** buffer that holds real variable. The constant is also the initializer
14709 ** for the run-time allocated buffer.
16544 /* Page cache buffer management:
16903 u16 sz; /* Size of each buffer in bytes */
16921 LookasideSlot *pNext; /* Next buffer in the list of free buffers */
19480 int szLookaside; /* Default lookaside buffer size */
19481 int nLookaside; /* Default lookaside buffer count */
19732 int iEphCsr; /* Partition buffer or Peer buffer */
19739 int nBufferCol; /* Number of columns in buffer table */
25974 ** Fill a buffer with pseudo-random bytes. This is used to preset
30111 ** Allocate memory for a temporary buffer needed for printf rendering.
30113 ** If the requested size of the temp buffer is larger than the size
30114 ** of the output buffer in pAccum, then cause an SQLITE_TOOBIG error.
30140 #define etBUFSIZE SQLITE_PRINT_BUF_SIZE /* Size of the output buffer */
30158 char *bufpt; /* Pointer to the conversion buffer */
30177 char *zOut; /* Rendering buffer */
30178 int nOut; /* Size of the rendering buffer */
30188 char buf[etBUFSIZE]; /* Conversion buffer */
30190 /* pAccum never starts out with an empty buffer that was obtained from
30545 i64 szBufNeeded; /* Size of a temporary buffer needed */
30928 /* Force exponential buffer size growth as long as it does not overflow,
30960 ** Append N copies of character c to the given string buffer.
30975 ** work (enlarging the buffer) using tail recursion, so that the
31116 ** zBase: An initial buffer. May be NULL in which case the initial buffer
31260 ** sqlite3_log() must render into a static buffer. It cannot dynamically
33245 unsigned char *zOut; /* Output buffer */
33291 /* Set len to the maximum number of bytes required in the output buffer. */
33303 ** character. Two bytes are required in the output buffer for the
33309 /* Set zIn to point at the start of the input buffer and zTerm to point 1
33312 ** Variable zOut is set to point at the output buffer, space obtained
34121 /* This branch is needed to avoid a (harmless) buffer overread. The
35970 ** zKeyOut[]. The zKeyOut[] buffer is assumed to hold at least
36131 ** beginning of the buffer are encoded as a little-endian
36685 ** Populate buffer zOut with the full canonical pathname corresponding
36686 ** to the pathname in zPath. zOut is guaranteed to point to a buffer
36715 ** Populate the buffer pointed to by zBufOut with nByte bytes of
38060 ** returns a pointer to a buffer containing the error message. That pointer
40162 ** Read data from a file into a buffer. Return SQLITE_OK if all
40235 /* Unread parts of the buffer must be zero-filled */
40251 const void *pBuf, /* Copy data from this buffer to the file */
40252 int nBuf, /* Size of buffer pBuf in bytes */
40300 ** Write data from a buffer into a file. Return SQLITE_OK on success
41141 ** Object used to represent an shared memory buffer.
43021 ** a temporary file. Use this buffer to store the file name in.
43362 char *zOut, /* Output buffer */
43363 int nOut /* Allocated size of buffer zOut */
43376 /* SQLite assumes that xFullPathname() nul-terminates the output buffer
43422 ** is stored as a nul-terminated string in the buffer pointed to by
43425 ** zOut points to a buffer of at least sqlite3_vfs.mxPathname bytes
43427 ** this buffer before returning.
43432 int nOut, /* Size of output buffer in bytes */
43433 char *zOut /* Output buffer */
43577 ** Write nBuf bytes of random data to the supplied buffer zBuf.
44530 char *conchPath; /* buffer in which to construct conch name */
44595 ** is a string buffer at least MAXPATHLEN+1 characters in size.
45384 * The size of the buffer used by sqlite3_win32_write_debug().
47064 ** is zero if the error message fits in the buffer, or non-zero
47070 ** buffer, excluding the terminating null char.
47099 /* allocate a buffer and convert to UTF8 */
47104 /* free the system buffer allocated by FormatMessage */
47122 /* allocate a buffer and convert to UTF8 */
47126 /* free the system buffer allocated by FormatMessage */
47134 /* copy a maximum of nBuf chars to output buffer */
47136 /* free the UTF8 buffer */
47789 ** Read data from a file into a buffer. Return SQLITE_OK if all
47795 void *pBuf, /* Write content into this buffer */
47810 OSTRACE(("READ pid=%lu, pFile=%p, file=%p, buffer=%p, amount=%d, "
47857 /* Unread parts of the buffer must be zero-filled */
47870 ** Write data from a buffer into a file. Return SQLITE_OK on success
47888 OSTRACE(("WRITE pid=%lu, pFile=%p, file=%p, buffer=%p, amount=%d, "
49780 ** This function returns non-zero if the specified UTF-8 string buffer
49833 /* Allocate a temporary buffer to store the fully qualified file
50014 ** Check that the output buffer is large enough for the temporary file
50109 ** a temporary file. Use this buffer to store the file name in.
50657 int nFull, /* Size of output buffer in bytes */
50658 char *zFull /* Output buffer */
50836 int nFull, /* Size of output buffer in bytes */
50837 char *zFull /* Output buffer */
50921 unsigned char *a; /* Gather entropy into this buffer */
51083 ** a buffer of nBuf bytes. The OS layer should populate the
51084 ** buffer with a nul-terminated UTF-8 encoded error message
51088 ** If the error message is too large for the supplied buffer,
51090 ** is zero if the error message fits in the buffer, or non-zero
51093 ** in the output buffer.
51924 ** Populate buffer zOut with the full canonical pathname corresponding
51925 ** to the pathname in zPath. zOut is guaranteed to point to a buffer
51947 ** Populate the buffer zErrMsg (size nByte bytes) with a human readable
51970 ** Populate the buffer pointed to by zBufOut with nByte bytes of
52107 sqlite3_int64 szBuf, /* Total size of buffer pData[] */
53559 ** The database page content is up front (so that buffer overreads tend to
53580 ** area after the page content buffer. The header serves as that overrun
53627 ** structure. A buffer of PgHdr1.pCache->szPage bytes is allocated
53631 ** read a few bytes (no more than 16 bytes) past the end of the page buffer.
53632 ** It will only read past the end of the page buffer, never write. This
53633 ** object is positioned immediately after the page buffer to serve as an
53640 ** corrupt, code at the b-tree layer may overread the page buffer and
53741 ** buffer provided using the SQLITE_CONFIG_PAGECACHE mechanism.
53801 ** This function is called during initialization if a static buffer is
53870 ** Malloc function used within this file to allocate space from the buffer
53872 ** such buffer exists or there is no space left in it, this function falls
53914 ** Free an allocated buffer obtained from pcache1Alloc().
54021 ** Malloc function used by SQLite to obtain space from the buffer configured
54022 ** using sqlite3_config(SQLITE_CONFIG_PAGECACHE) option. If no such buffer
54031 ** Free an allocated buffer obtained from sqlite3PageMalloc().
54245 ** configured a start-time buffer for use as page-cache memory using
54452 /* Step 5. If a usable page buffer has still not been found,
54526 ** size, return the recycled buffer. Otherwise, free the buffer and
54529 ** 5. Otherwise, allocate and return a new page buffer.
55453 int nBuf, /* Size of buffer nBuf */
55454 u8 *zBuf, /* Temporary buffer to use */
56487 ** Return a pointer to a human readable string in a static buffer
56619 ** Write a 32-bit integer into a string buffer in big-endian byte order.
56791 ** zSuper must point to a buffer of at least nSuper bytes allocated by
56799 ** file, then it is copied into the buffer pointed to by zSuper. A
56800 ** nul-terminator byte is appended to the buffer following the
56815 unsigned char aMagic[8]; /* A buffer to hold the magic header */
56951 u32 nHeader = (u32)pPager->pageSize;/* Size of buffer pointed to by zHeader */
57014 /* Initializing the tail of the buffer is not necessary. Everything
57035 ** database page size. Since the zHeader buffer is only Pager.pageSize
57074 unsigned char aMagic[8]; /* A buffer to hold the magic header */
57682 ** Parameter aData must point to a buffer of pPager->pageSize bytes
58010 ** Argument zSuper may point to Pager.pTmpSpace. So that buffer is not
58056 char *zFree = 0; /* Free this buffer */
58337 ** buffer Pager.pTmpSpace is (mxPathname+1) bytes or larger. i.e. that
59257 ** to obtain a new Pager.pTmpSpace buffer. If this allocation attempt
59328 ** Return a pointer to the "temporary page" buffer held internally
59329 ** by the pager. This is a buffer that is big enough to hold the
59330 ** entire content of a database page. This buffer is used internally
59387 ** opened on a file less than N bytes in size, the output buffer is
59394 ** output buffer undefined.
59825 ** as a temporary buffer to inspect the first couple of bytes of
60292 /* Compute and store the full pathname in an allocated buffer pointed
60528 ** Pager.pageSize and to allocate the Pager.pTmpSpace buffer.
62659 ** This function returns a pointer to a buffer containing the encrypted
64171 ** This function encodes a single frame header and writes it to a buffer
64617 u8 *aFrame = 0; /* Malloc'd buffer to load entire frame */
64618 int szFrame; /* Number of bytes in buffer aFrame[] */
64619 u8 *aData; /* Pointer to data part of aFrame buffer */
64670 /* Malloc a buffer to read frames into. */
64821 ** already be opened on connection pDbFd. The buffer that zWalName points
65010 ht_slot *aTmp /* Temporary buffer */
65014 int iOut = 0; /* Current index in output buffer */
65405 u8 *zBuf /* Temporary buffer to use */
65882 u8 *aFrame = 0; /* Malloc'd buffer to load entire frame */
65883 int szFrame; /* Number of bytes in buffer aFrame[] */
65884 u8 *aData; /* Pointer to data part of aFrame buffer */
65970 /* Allocate a buffer to read frames into */
66604 ** Read the contents of frame iRead from the wal file into buffer pOut
66611 int nOut, /* Size of buffer pOut in bytes */
67232 int nBuf, /* Size of temporary buffer */
67233 u8 *zBuf, /* Temporary buffer to use */
67864 ** corruption-induced buffer overflow. */
69281 ** set to point to a malloced buffer pCur->nKey bytes in size containing
69296 ** the sqlite3VdbeRecordUnpack() function may overread the buffer by
70424 u32 iEnd = iStart + iSize; /* First byte past the iStart buffer */
71867 ** required as the version of page 1 currently in the page1 buffer
73520 ** Copy data from a buffer to a page, or from a page to a buffer.
73524 ** from pPayload to the buffer pointed at by pBuf. If eOp is true,
73526 ** of data are copied from the buffer pBuf to pPayload.
73532 void *pBuf, /* Pointer to buffer */
73538 /* Copy data from buffer to page (a write operation) */
73545 /* Copy data from page to buffer (a read operation) */
73560 ** Data is read to or from the buffer pBuf.
73584 unsigned char *pBuf, /* Write the bytes into this buffer */
73593 unsigned char * const pBufStart = pBuf; /* Start of original out buffer */
73715 ** 6) at least 4 bytes have already been read into the output buffer
73718 ** output buffer, bypassing the page-cache altogether. This speeds
73834 ** the key/data and copy it into a preallocated buffer.
74557 ** this case the whole cell needs to be parsed, a buffer allocated
74559 ** buffer before VdbeRecordCompare() can be called.
74562 ** up to two varints past the end of the buffer. An extra 18
74563 ** bytes of padding is allocated at the end of the buffer in
75459 ** buffer space that is separate from the pPage buffer area */
75753 ** as many as 4 bytes in front of the start of the aData buffer for
76256 ** The pSpace buffer is used to store a temporary copy of the divider
76259 ** words, at most 13 bytes. Hence the pSpace buffer must be at
76333 ** cell on pPage into the pSpace buffer.
76488 ** buffer big enough to hold one page. If while inserting cells into the parent
76489 ** page (pParent) the parent page becomes overfull, this buffer is
76493 ** of the page-size, the aOvflSpace[] buffer is guaranteed to be large
76622 ** buffer. It will be copied out again as soon as the aSpace[] buffer
77439 ** buffer.
77459 ** are stored in the pSpace buffer allocated immediately below.
77464 ** has completed, it is safe to release the pSpace buffer used by
77467 ** pSpace buffer passed to the latter call to balance_nonroot().
77473 /* If pFree is not NULL, it points to the pSpace buffer used
77476 ** new pSpace buffer, so it may be safely freed here. */
77480 /* The pSpace buffer will be freed after the next call to
77935 ** writes the data for the new cell into the BtShared.pTmpSpace buffer
77945 u8 *aOut = pBt->pTmpSpace; /* Pointer to next output buffer */
77946 const u8 *aIn; /* Pointer to next input buffer */
77947 u32 nIn; /* Size of input buffer aIn[] */
77972 u32 nOut; /* Size of output buffer aOut[] */
79968 ** Parameter zSrcData points to a buffer containing the data for
80652 ** into a buffer.
80867 ** terminate a UTF16 string, even if the initial size of the buffer
81668 ** string is copied into a (possibly existing) buffer managed by the
81669 ** Mem structure. Otherwise, any existing buffer is freed and the
82425 const void *pRec, /* Pointer to buffer containing record */
82426 int nRec, /* Size of buffer pRec in bytes */
84281 ** Use zTemp for any required temporary buffer space.
85264 ** or SQLITE_TRANSIENT. If it is SQLITE_DYNAMIC, then the buffer pointed
85271 const char *zName, /* Pointer to buffer containing name */
86568 ** the unaligned buffer passed via the second and third arguments (presumably
86571 ** allocation comes from the pSpace/szSpace buffer, *ppFree is set to NULL
86695 ** a buffer overread. The "d1+serial_type1+2" subexpression will
87004 ** except 7. The second points to a buffer containing an integer value
87287 ** To avoid concerns about buffer overreads, this routine is only used
87459 ** also assumes that it is safe to overread a buffer by at least the
87462 ** buffer passed to varintRecordCompareInt() this makes it convenient to
90767 ** into buffer zBuf, length nBuf.
93428 ** buffer passed to it, debugging function VdbeMemPrettyPrint() may
93852 /* Make sure the output register has a buffer large enough to store
93859 ** No error checks or buffer enlargement is required */
99303 ** be set to point to a buffer containing an error message. It is the
99304 ** responsibility of the caller to free the error message buffer using
100134 u8 *aBuffer; /* Current read buffer */
100135 int nBuffer; /* Size of read buffer in bytes */
100192 u8 *aBuffer; /* Pointer to write buffer */
100193 int nBuffer; /* Size of write buffer in bytes */
100194 int iBufStart; /* First byte of buffer to write */
100195 int iBufEnd; /* Last byte of buffer to write */
100196 i64 iWriteOff; /* Offset of start of buffer in file */
100213 ** has finished passing records to the sorter, or when the in-memory buffer
100227 /* Return a pointer to the buffer containing the record data for SorterRecord
100255 ** If successful, set *ppOut to point to a buffer containing the data
100259 ** The buffer returned in *ppOut is only valid until the
100265 u8 **ppOut /* OUT: Pointer to buffer containing data */
100267 int iBuf; /* Offset within buffer to read from */
100268 int nAvail; /* Bytes of data available in buffer */
100278 /* If there is no more data to be read from the buffer, read the next
100302 /* The requested data is available in the in-memory buffer. In this
100304 ** pointer into the buffer to the caller. */
100308 /* The requested data is not all available in the in-memory buffer.
100324 /* Copy as much data as is available in the buffer into the start of
100331 ** the p->aAlloc[] buffer. */
100335 u8 *aNext; /* Pointer to buffer to copy data from */
100548 ** Compare key1 (buffer pKey1, size nKey1 bytes) with key2 (buffer pKey2,
101917 ** the main thread to fill its buffer. So calling PmaReaderNext()
101947 ** initialized as for INCRINIT_NORMAL and the aFile[1] buffer belonging to
102445 ** Return a pointer to a buffer owned by the sorter that contains the
107202 ** itself and the buffer referred to by Expr.u.zToken, if any.
107222 ** is not NULL then *pzBuffer is assumed to point to a buffer large enough
107226 ** portion of the buffer copied into by this function.
113524 /* Set zQuot to point to a buffer containing a quoted copy of the
114767 ** Argument zWhere may be a pointer to a buffer containing a table name,
116409 /* Take a copy of the sample. Add two 0x00 bytes the end of the buffer.
116412 ** end of the allocated buffer before it realizes it is dealing with
116414 ** a buffer overread. */
118410 ** Parameter zName points to a nul-terminated buffer containing the name
119541 ** The first parameter is a pointer to an output buffer. The second
119543 ** which to write into the output buffer. This function copies the
119545 ** to the specified offset in the buffer and updates *pIdx to refer
119550 ** then it is copied to the output buffer exactly as it is. Otherwise,
126032 /* Grow the size of the output buffer only on substitutions
127810 ** the lookaside buffer belonging to database handle dbMem.
128488 /* Re-enable the lookaside buffer, if it was disabled earlier. */
128671 ** Memory for the buffer containing the column index affinity string
134815 ** buffer that the pager module resizes using sqlite3_realloc().
152673 ** Before returning, *pzAff is set to point to a buffer containing a
161506 ** paths currently in the best-so-far buffer. So discard
164141 /* Assign a cursor number for the ephemeral table used to buffer rows.
173980 ** number of bytes in the memory buffer, and the minimum allocation size.
174164 /* Free any existing lookaside buffer for this handle before
175909 ** Checkpoint database zDb. If zDb is NULL, or if the buffer zDb points
176326 ** point to a buffer containing the name of the file to open. The value
176333 ** may be set to point to a buffer containing an English language error
176335 ** this buffer by calling sqlite3_free().
176402 /* Copy the filename and any query parameters into the zFile buffer.
179082 ** To tokenize an input buffer, the sqlite3_tokenizer_module.xOpen()
179084 ** that may be used to tokenize a specific input buffer based on
179129 ** Create a tokenizer cursor to tokenize an input buffer. The caller
179130 ** is responsible for ensuring that the input buffer remains valid
179135 const char *pInput, int nBytes, /* Input buffer */
179149 ** the end of the buffer has been reached, or an SQLite error code.
179151 ** *ppToken should be set to point at a buffer containing the
179154 ** of this buffer in bytes. The input text that generated the token is
179157 ** byte of the token in the input buffer. *piEndOffset should be set
179159 ** the input buffer.
179161 ** The buffer *ppToken is set to point at is managed by the tokenizer
179172 int *piStartOffset, /* OUT: Byte offset of token in input buffer */
179173 int *piEndOffset, /* OUT: Byte offset of end of token in input buffer */
179545 ** The following array of hash tables is used to buffer pending index
179618 int nDoclist; /* Size of buffer at aDoclist */
179681 int n; /* Number of bytes in buffer z */
179715 ** points to a malloced buffer, size nDoclist bytes, containing the results
179718 ** buffer.
179846 char *zTerm; /* Pointer to term buffer */
179848 char *aDoclist; /* Pointer to doclist buffer */
180455 char **pz, /* IN/OUT: Pointer to string buffer */
180520 ** The pointer returned points to a buffer allocated by sqlite3_malloc(). It
180577 ** The pointer returned points to a buffer allocated by sqlite3_malloc(). It
181386 /* Allocate a buffer large enough for an Fts3Cursor structure. If the
181532 int nNode, /* Size of buffer at zNode */
181538 const char *zEnd = &zCsr[nNode];/* End of interior node buffer */
181540 i64 nAlloc = 0; /* Size of allocated buffer */
181550 ** varints from the buffer) does not risk an overread. If zNode is a
181551 ** root node, then the buffer comes from a SELECT statement. SQLite does
181634 ** The buffer pointed to by argument zNode (size nNode bytes) contains an
181635 ** interior node of a b-tree segment. The zTerm buffer (size nTerm bytes)
181659 int nNode, /* Size of buffer at zNode */
181826 char **pp, /* IN/OUT: Pointer into position-list buffer */
181867 char **pp, /* Output buffer */
181906 ** and writes the results to buffer p. p is left pointing to the byte
181967 char **pp, /* IN/OUT: Preallocated output buffer */
182090 char **pp, /* Output buffer */
182091 char *aTmp, /* Temporary buffer space */
182131 int anOutput[16]; /* Size each output buffer in bytes */
182135 ** This function is used to read a single varint from a buffer. Parameter
182136 ** pEnd points 1 byte past the end of the buffer. When this function is
182137 ** called, if *pp points to pEnd or greater, then the end of the buffer
182149 char *pEnd, /* End of buffer */
182167 ** This function is used to write a single varint to a buffer. The varint
182172 ** the buffer is that of parameter iVal.
182223 ** If no error occurs, *paOut is set to point at an sqlite3_malloc'd buffer
182399 ** to the output buffer pOut, followed by a position list consisting only
182517 ** buffer using memcpy().
182520 ** allocation. This is so as to ensure that the buffer is big enough
182808 int *pnOut, /* OUT: Size of buffer at *ppOut */
182809 char **ppOut /* OUT: Malloced result buffer */
182854 ** in buffer aList[], size nList bytes.
183840 ** This function assumes that pList points to a buffer allocated using
183842 ** freeing the buffer.
185565 ** The returned value is either NULL or a pointer to a buffer containing
185569 ** More specifically, the returned buffer contains 1 varint for each
185573 ** for 'X' is requested, the buffer returned may contain:
185613 ** pCsr->iPrevId may lie earlier in the doclist buffer. Or, if the
186484 ** Extract the next token from buffer z (length n) using the tokenizer
186487 ** single token and set *ppExpr to point to it. If the end of the buffer is
186585 ** is included in the buffer. This function attempts to tokenize the entire
186586 ** input buffer and create an Fts3Expr structure of type FTSQUERY_PHRASE
186626 ** appends buffer zTemp to buffer p, and fills in the Fts3Expr and Fts3Phrase
186706 ** structure, or set to 0 if the end of the input buffer is reached.
186922 ** Parse the fts3 query expression found in buffer z, length n. This function
186923 ** returns either when the end of the buffer is reached or an unmatched
186928 ** bytes read from buffer z. Otherwise, *ppExpr is set to 0 and SQLITE_NOMEM
187320 ** Parameters z and n contain a pointer to and length of a buffer containing
187432 ** Return a pointer to a buffer containing a text representation of the
187433 ** expression passed as the first argument. The buffer is obtained from
188053 int nAllocated; /* space allocated to zToken buffer */
188340 ** no chance of overflowing the zOut buffer.
189236 int nTokenAllocated; /* space allocated to zToken buffer */
189918 ** When full-text index nodes are loaded from disk, the buffer that they
189920 ** of it. i.e. if a full-text index node is 900 bytes in size, then a buffer
189923 ** This means that if we have a pointer into a buffer containing node data,
190035 int nNode; /* Size of buffer at aNode (or 0) */
190036 int nPopulate; /* If >0, bytes of buffer aNode[] loaded */
190048 int nTermAlloc; /* Allocated size of zTerm buffer */
190076 char *zTerm; /* Pointer to previous term buffer */
190078 int nMalloc; /* Size of malloc'd buffer at zMalloc */
190109 char *zTerm; /* Pointer to previous term buffer */
190111 int nMalloc; /* Size of malloc'd buffer at zMalloc */
190520 ** Append a single varint to a PendingList buffer. SQLITE_OK is returned
190762 /* TODO(shess) Explore whether partially flushing the buffer on
190765 ** buffer was half empty, that would let the less frequent terms
191064 ** NULL, then a buffer is allocated using sqlite3_malloc() and populated
191072 ** eventually free the returned buffer.
191087 char **paBlob, /* OUT: Blob data in malloc'd buffer */
191508 int nRoot, /* Size of buffer containing root node */
191594 int nTerm, /* Size of buffer zTerm */
191814 char *z, /* Pointer to buffer containing block data */
191815 int n /* Size of buffer z in bytes */
191862 int nRoot /* Number of bytes in buffer zRoot */
191896 int nPrev, /* Size of buffer zPrev in bytes */
191898 int nNext /* Size of buffer zNext in bytes */
191914 const char *zTerm, /* Pointer to buffer containing term */
191943 ** and the static node buffer (p->nNodeSize bytes) is not large
191944 ** enough. Use a separately malloced buffer instead This wastes
192040 ** Write the buffer for the segment node pTree and all of its peers to the
192124 int isCopyTerm, /* True if buffer zTerm must be copied */
192125 const char *zTerm, /* Pointer to buffer containing term */
192127 const char *aDoclist, /* Pointer to buffer containing doclist */
192146 /* Allocate a buffer in which to accumulate data */
192218 /* If the buffer currently allocated is too small for this entry, realloc
192219 ** the buffer to make it large enough.
192229 /* Append the prefix-compressed term and doclist to the buffer. */
192241 ** If the isCopyTerm parameter is true, then the buffer pointed to by
192282 char *zRoot = NULL; /* Pointer to buffer containing root node */
192283 int nRoot = 0; /* Size of buffer zRoot */
192496 ** When this function is called, buffer *ppList (size *pnList bytes) contains
192511 int *pnList /* IN/OUT: Size of buffer *ppList in bytes */
192546 ** Cache data in the Fts3MultiSegReader.aBuffer[] buffer (overwriting any
192547 ** existing data). Grow the buffer if required.
192550 ** trying to resize the buffer, return SQLITE_NOMEM.
193573 ** An instance of the following structure is used as a dynamic buffer
193637 ** to reflect the new size of the pBlob->a[] buffer.
193710 ** Initialize a node-reader object to read the node in buffer aNode/nNode.
193839 ** It is assumed that the buffer associated with pNode is already large
193840 ** enough to accommodate the new entry. The buffer associated with pPrev
194066 ** Compare the term in buffer zLhs (size in bytes nLhs) with that in
194150 const char *aRoot = 0; /* Pointer to %_segdir.root buffer */
194515 /* Populate new node buffer */
194557 int nTerm /* Number of bytes in buffer zTerm */
195065 const char *zTerm, /* Pointer to buffer containing term */
195802 u32 *aMatchinfo; /* Pre-allocated buffer */
195826 char *z; /* Pointer to buffer containing string */
195828 int nAlloc; /* Allocated size of buffer z in bytes */
196300 ** Append a string to the string-buffer passed as the first argument.
196307 const char *zAppend, /* Pointer to data to append to buffer */
196315 ** to grow the buffer until so that it is big enough to accomadate the
196329 /* Append the data to the string buffer. */
196362 int nDoc, /* Size of buffer zDoc in bytes */
196420 ** append it to string buffer pOut.
196918 ** Populate the buffer pInfo->aMatchinfo[] with an array of integers to
196932 ** pInfo->aMatchinfo[] buffer is left in is undefined.
197094 /* Determine the number of integers in the buffer returned by this call. */
197327 ** string-buffer res for each column.
197804 /* Grow the output buffer if required. */
198487 /* Append a comma separator to the output buffer, if the previous
201496 ** to the argument buffer (always 2, 4 and 8 respectively).
204973 ** the database and copied into a buffer obtained from sqlite3_malloc().
204974 ** If no error occurs, a pointer to the buffer is returned and (*pnNode)
204975 ** is set to the size of the buffer in bytes.
207712 UChar *zOutput = 0; /* Pointer to output buffer */
207714 int nOut; /* Size of output buffer in bytes */
208713 ** *pzErrmsg may be set to point to a buffer containing a utf-8 formatted
208715 ** eventually free any such buffer using sqlite3_free().
209322 ** Compute a 32-bit checksum on the N-byte buffer. Return the result.
209360 ** The output buffer should be big enough to hold the whole output
209382 char *zOut /* Write the output into this preallocated buffer */
209529 ** Prepare the SQL statement in buffer zSql against database handle db.
209535 ** point to a buffer containing an error message. It is the responsibility
209536 ** of the caller to (eventually) free this buffer using sqlite3_free().
209556 ** If an error has occurred, then set *pzErrmsg to point to a buffer
209558 ** to eventually free this buffer using sqlite3_free().
209569 ** Unless it is NULL, argument zSql points to a buffer allocated using
209571 ** statement against database db and frees the buffer. If statement
209578 ** buffer using sqlite3_free().
210751 ** a buffer containing the string "?,?,?".
213362 ** Given that zWal points to a buffer containing a wal file name passed to
213415 ** Read and return an unsigned 32-bit big-endian integer from the buffer
213427 ** buffer.
213874 ** (pFd->zWal) to point to a buffer owned by SQLite that contains
213876 ** happens to pass a pointer to this buffer when using xAccess()
213984 ** Populate buffer zOut with the full canonical pathname corresponding
213985 ** to the pathname in zPath. zOut is guaranteed to point to a buffer
214008 ** Populate the buffer zErrMsg (size nByte bytes) with a human readable
214039 ** Populate the buffer pointed to by zBufOut with nByte bytes of
214215 ** buffer. This way small buffer overreads caused by corrupt database pages
214216 ** do not cause undefined behaviour. This module pads each page buffer
214288 u8 *aPg; /* Page buffer from sqlite3_malloc() */
214715 ** Load a copy of the page data for page iPg into the buffer belonging
214716 ** to page object pPg. Allocate the buffer if necessary. Return SQLITE_OK
215579 u8 *aBuf; /* Pointer to changeset buffer */
215580 int nBuf; /* Size of buffer aBuf */
215586 ** input data. Input data may be supplied either as a single large buffer
215594 u8 *aData; /* Pointer to buffer containing changeset */
215597 SessionBuffer buf; /* Current read buffer */
215607 SessionInput in; /* Input buffer or stream */
215672 ** UTF-8). Followed by a buffer containing the UTF-8 representation
215677 ** a buffer containing the value itself.
215814 int nRecord; /* Number of bytes in buffer aRecord[] */
215820 ** Write a varint with value iVal into the buffer at aBuf. Return the
215846 ** Read a 64-bit big-endian integer value from buffer aRec[]. Return
215857 ** Write a 64-bit big-endian integer value to the buffer aBuf[].
215875 ** buffer aBuf. *pnWrite is set to the number of bytes written before
215955 ** Allocate and return a pointer to a buffer nByte bytes in size. If
215966 ** Free buffer pFree, which must have been allocated by an earlier
216091 ** The buffer that the argument points to contains a serialized SQL value.
216195 ** a single records which is written to the buffer at *paOut. *paOut is
216252 u8 **paOne, /* IN/OUT: Left-hand buffer pointer */
216253 u8 **paTwo, /* IN/OUT: Right-hand buffer pointer */
216286 u8 **paOut, /* IN/OUT: Pointer to output buffer */
217506 ** Ensure that there is room in the buffer to append nByte bytes of data.
217507 ** If not, use sqlite3_realloc() to grow the buffer so that there is.
217548 ** Append the value passed as the second argument to the buffer passed
217572 ** called. Otherwise, append a single byte to the buffer.
217585 ** called. Otherwise, append a single varint to the buffer.
217598 ** called. Otherwise, append a blob of data to the buffer.
217617 ** called. Otherwise, append a string to the buffer. All bytes in the string
217618 ** up to (but not including) the nul-terminator are written to the buffer.
217638 ** to the buffer. No nul-terminator is written.
217656 ** with any embedded quote characters escaped to the buffer. No
217685 ** to to the buffer.
217729 ** This function appends an update change to the buffer (see the comments
217743 ** (i.e. nothing has changed), then no data at all is appended to the buffer.
217845 ** Append a DELETE change to the buffer passed as the first argument. Use
218029 ** changeset format) to buffer *pBuf. If an error occurs, set *pRc to an
218033 SessionBuffer *pBuf, /* Append header to this buffer */
218060 int *pnChangeset, /* OUT: Size of buffer at *ppChangeset */
218094 int nRewind = buf.nBuf; /* Initial size of write buffer */
218095 int nNoop; /* Size of buffer after writing tbl header */
218138 /* If the buffer is now larger than sessions_strm_chunk_size, pass
218181 ** It is the responsibility of the caller to eventually free the buffer
218186 int *pnChangeset, /* OUT: Size of buffer at *ppChangeset */
218227 ** It is the responsibility of the caller to eventually free the buffer
218232 int *pnPatchset, /* OUT: Size of buffer at *ppChangeset */
218331 int nChangeset, /* Size of buffer pChangeset in bytes */
218332 void *pChangeset, /* Pointer to buffer containing changeset */
218367 int nChangeset, /* Size of buffer pChangeset in bytes */
218368 void *pChangeset /* Pointer to buffer containing changeset */
218374 int nChangeset, /* Size of buffer pChangeset in bytes */
218375 void *pChangeset, /* Pointer to buffer containing changeset */
218404 ** object and the buffer is full, discard some data to free up space.
218420 ** Ensure that there are at least nByte bytes available in the buffer. Or,
218422 ** data is in the buffer.
218477 ** buffer. SQLITE_OK is returned if successful, or SQLITE_NOMEM if an OOM
218483 int nData, /* Size of buffer aData[] in bytes */
218498 ** Deserialize a single record from a buffer in memory. See "RECORD FORMAT"
218597 ** buffer (i.e. that it can be accessed without any calls to xInput()).
218761 /* Make sure the buffer contains at least 10 bytes of input data, or all
218801 int nVal; /* Number of values to buffer */
219087 SessionBuffer sOut; /* Output buffer */
219093 /* Initialize the output buffer */
219297 int bInvertConstraints; /* Invert when iterating constraints buffer */
219739 ** It adds a conflict resolution record to the buffer in
219741 ** of apply_v2() as the "rebase" buffer.
219755 /* Append a table-header to the rebase buffer */
219855 ** to the SessionApplyCtx.constraints buffer. */
220105 ** Retry the changes accumulated in the pApply->constraints buffer.
220593 ** buffer of the new object is large enough to hold any record that
220776 ** buffer containing the output changeset before this function returns. In
220777 ** this case (*pnOut) is set to the size of the output buffer in bytes. It
220778 ** is the responsibility of the caller to free the output buffer using
220850 ** Add the changeset currently stored in buffer pData, size nData bytes,
220866 ** Obtain a buffer containing a changeset representing the concatenation
220985 ** record to buffer pBuf that is a copy of a1, except that for
221020 ** or more remote UPDATE changes. The aRec/nRec buffer contains the current
221021 ** old.* and new.* records for the change. The rebase buffer (a single
221022 ** record) is in aChange/nChange. The rebased change is appended to buffer
221028 ** in the rebase buffer is set to "replaced" (type 0xFF). If this
221030 ** to the output buffer.
221033 ** corresponding field in the rebase buffer is not "undefined" (0x00)
221035 ** in the rebase buffer.
221096 ** then (*ppOut) is set to point to a buffer containing the rebased changeset
221098 ** the buffer in bytes. It is the responsibility of the caller to eventually
221099 ** free the (*ppOut) buffer using sqlite3_free().
221445 ** current document. If successful, (*pz) is set to point to a buffer
221447 ** (not characters) of the buffer and SQLITE_OK is returned. Otherwise,
221725 ** arguments are a pointer to a buffer containing the token text, and the
221740 ** input buffer is exhausted, xTokenize() should return SQLITE_OK. Finally,
221864 const char *pToken, /* Pointer to buffer containing token */
222239 int n; /* Size of buffer at a[] in bytes */
222249 const u8 *a, int n, /* Poslist buffer to iterate through */
222335 ** Argument p points to a buffer containing utf-8 text that is n bytes in
222337 ** buffer, or 0 if there are less than nChar characters in total.
222627 int n; /* Size of buffer p in bytes */
224409 ** z points to a buffer containing n bytes of text to append. If n is
225036 ** Encode value iVal as an SQLite varint and append it to the buffer object
225056 ** Append buffer nData/pData to buffer pBuf. If an OOM error occurs, set
225074 ** Append the nul-terminated string zStr to the buffer pBuf. This function
225075 ** ensures that the byte following the buffer data is set to 0x00, even
225090 ** the printf() style processing, then appends the results to buffer pBuf.
225093 ** following the buffer data is set to 0x00, even though this byte is not
225133 ** Free any buffer allocated by pBuf. Zero the structure before returning.
225141 ** Zero the contents of the buffer object. But do not free the associated
225149 ** Set the buffer to contain nData/pData. If an OOM error occurs, leave an
225214 const u8 *a, int n, /* Poslist buffer to iterate through */
225225 ** Append position iPos to the position list being accumulated in buffer
225277 ** buffer using sqlite3_free(). If an OOM error occurs, NULL is returned.
225546 ** found, -1 is returned. If -1 is returned, the buffer is left in an
225568 ** to the output buffer. */
225810 ** Gobble up the first bareword or quoted word from the input buffer zIn.
225815 ** Before returning, set pzOut to point to a new buffer containing a
225827 char **pzOut, /* OUT: malloc'd buffer containing str/bw */
226106 ** const char *pToken // Pointer to buffer containing token
226526 const char **pz, /* IN/OUT: Pointer into buffer */
226832 Fts5Buffer *pBuf, /* Use this buffer for space if required */
226905 ** the pPhrase->poslist buffer accordingly. Output parameter *pbMatch
226999 int n; /* Size of buffer a[] in bytes */
227075 ** buffer and buffer size to the lookaside-reader init function, zero
227076 ** the phrase poslist buffer. The new poslist for the phrase (containing
228838 ** pointer to a buffer containing that representation. It is the
228839 ** responsibility of the caller to at some point free the buffer using
229286 const char *pToken, /* Pointer to buffer containing token */
230274 u8 *p; /* Pointer to buffer containing record */
230570 ** Allocate and return a buffer at least nByte bytes in size.
230580 ** Compare the contents of the pLeft buffer with the pRight/nRight blob.
230599 ** Compare the contents of the two buffers using memcmp(). If one buffer
230676 u8 *aOut = 0; /* Read blob data into this buffer */
230887 ** form within buffer pData/nData.
230899 int nData, /* Size of buffer pData in bytes */
231457 ** before the buffer in memory. */
231620 ** Argument p points to a buffer containing a varint to be interpreted as a
233025 Fts5Buffer *pBuf; /* Append to this buffer */
233032 Fts5Buffer *pBuf; /* Append to this buffer */
233171 ** buffer pBuf. It does not make a copy of the position-list size
233208 ** Parameter pPos points to a buffer containing a position list, size nPos.
233211 ** If memory is required for the new position list, use buffer pIter->poslist.
233302 ** Fts5Iter.poslist buffer and then set the output pointer to point
233303 ** to this buffer. */
233398 ** Fts5Iter.poslist buffer and then set the output pointer to point
233399 ** to this buffer. */
233634 ** Return a pointer to a buffer containing the term associated with the
233718 ** Return the size of the prefix, in bytes, that buffer
233719 ** (pNew/<length-unknown>) shares with buffer (pOld/nOld).
233722 ** than buffer (pOld/nOld).
233959 /* Append the pgidx to the page buffer. Set the szLeaf header field. */
234084 ** buffer, in case a doclist-index is required. */
234930 ** Append a doclist to buffer pBuf.
234932 ** This function assumes that space within the buffer has already been
234953 ** Swap the contents of buffer *p1 with that of *p2.
235059 ** doclist in buffer p1.
235078 /* Initialize a doclist-iterator for each input buffer. Arrange them in
235210 int nToken, /* Size of buffer pToken in bytes */
235469 ** Argument p points to a buffer containing utf-8 text that is n bytes in
235471 ** buffer, or 0 if there are less than nChar characters in total.
235736 ** Replace the current "averages" record with the contents of the buffer
235899 ** Check if buffer z[], size n bytes, contains as series of valid utf-8
235900 ** encoded codepoints. If so, return 0. Otherwise, if the buffer does not
235971 ** Also only do this if buffer zTerm contains nTerm bytes of valid
235972 ** utf-8. Otherwise, the last part of the buffer contents might contain
236397 ** to the buffer passed as the second argument.
236423 ** appends a human-readable representation of record to the buffer passed
236446 ** each varint and append its string representation to buffer pBuf. Return
236447 ** after either the input buffer is exhausted or a 0 value is read.
236449 ** The return value is the number of bytes read from the input buffer.
236464 ** The start of buffer (a/n) contains the start of a doclist. The doclist
236465 ** may or may not finish within the buffer. This function appends a text
236466 ** representation of the part of the doclist that is present to buffer
236469 ** The return value is the number of bytes read from the input buffer.
236504 ** buffer pBuf.
236508 ** set to an SQLite error code before returning. The final state of buffer
236565 ** buffer overreads even if the record is corrupt. */
241376 /* Output buffer */
241411 /* Run through the tokenchars. Fold them into the output buffer along
241415 /* Grow the output buffer so that there is sufficient space to fit the
241432 /* An non-ascii-range character. Fold it into the output buffer if
244616 unsigned char *buffer;
244665 unsigned char *buffer;
244717 CODEC_STATIC int opensslGetRandom(Buffer *buffer){
244719 int rc = RAND_bytes(buffer->buffer, buffer->bufferSize);
244801 EVP_CipherUpdate(ctx, output, &cipherLength, input->buffer, input->bufferSize);
244822 HMAC_Init_ex(ctx, key->buffer, key->bufferSize, EVP_sha1(), NULL);
244824 HMAC_Init_ex(ctx, key->buffer, key->bufferSize, EVP_sha256(), NULL);
244826 HMAC_Init_ex(ctx, key->buffer, key->bufferSize, EVP_sha512(), NULL);
244828 HMAC_Update(ctx, input1->buffer, input1->bufferSize);
244829 HMAC_Update(ctx, input2->buffer, input2->bufferSize);
244830 HMAC_Final(ctx, output->buffer, (unsigned int *)(&output->bufferSize));
244838 PKCS5_PBKDF2_HMAC((const char *)(password->buffer), password->bufferSize, salt->buffer, salt->bufferSize,
244839 workfactor, EVP_sha1(), key->bufferSize, key->buffer);
244841 PKCS5_PBKDF2_HMAC((const char *)(password->buffer), password->bufferSize, salt->buffer, salt->bufferSize,
244842 workfactor, EVP_sha256(), key->bufferSize, key->buffer);
244844 PKCS5_PBKDF2_HMAC((const char *)(password->buffer), password->bufferSize, salt->buffer, salt->bufferSize,
244845 workfactor, EVP_sha512(), key->bufferSize, key->buffer);
244860 CODEC_STATIC int sqlite3CodecIsHex(const unsigned char *buffer, int bufferSize){
244863 if((buffer[i] < '0' || buffer[i] > '9') &&
244864 (buffer[i] < 'a' || buffer[i] > 'f') &&
244865 (buffer[i] < 'A' || buffer[i] > 'F')){
244893 char *buffer = NULL;
244896 buffer = (char *)(outputBuffer + i * 2);
244897 sqlite3_snprintf(3, buffer, "%02x ", inputBuffer[i]);
245084 password.buffer = keyCtx->password;
245086 salt.buffer = ctx->salt;
245088 key.buffer = keyCtx->key;
245104 hmacPassword.buffer = keyCtx->key;
245106 hmacSalt.buffer = ctx->hmacSalt;
245108 hmacKey.buffer = keyCtx->hmacKey;
245305 (void)memset_s(ctx->buffer, cipherPageSize, 0, cipherPageSize);
245306 sqlite3_free(ctx->buffer);
245310 ctx->buffer = (unsigned char *)sqlite3Malloc(size);
245311 if (ctx->buffer == NULL) {
245391 if(ctx->buffer){
245393 (void)memset_s(ctx->buffer, cipherPageSize, 0, cipherPageSize);
245394 sqlite3_free(ctx->buffer);
245395 ctx->buffer = NULL;
245419 ctx->buffer = (unsigned char *)sqlite3Malloc(DEFAULT_PAGE_SIZE);
245422 if(ctx->buffer == NULL || ctx->readCtx == NULL || ctx->writeCtx == NULL){
245426 errno_t memsetRc = memset_s(ctx->buffer, DEFAULT_PAGE_SIZE, 0, DEFAULT_PAGE_SIZE);
245452 salt.buffer = ctx->salt;
245490 key.buffer = ctx->hmacKey;
245493 input1.buffer = input;
245498 input2.buffer = pgnoBuffer;
245501 outputBuffer.buffer = output;
245516 unsigned char buffer[MAX_HMAC_SIZE];
245517 rc = sqlite3CodecHmac(ctx, pgno, bufferSize, input, buffer);
245521 return memcmp(buffer, expectResult, ctx->codecConst.hmacSize);
245561 inputBuffer.buffer = input;
245564 initVector.buffer = output + inputBuffer.bufferSize;
245570 void *cipherCtx = opensslGetCtx(keyCtx->codecConst.cipher, CODEC_OPERATION_ENCRYPT, keyCtx->key, initVector.buffer);
245616 inputBuffer.buffer = input;
245655 memcpyRc = memcpy_s(pCtx->buffer, cipherPageSize, SQLITE_FILE_HEADER, FILE_HEADER_SIZE);
245661 rc = sqlite3CodecDecryptData(pCtx, OPERATE_CONTEXT_READ, pgno, cipherPageSize - offset, (unsigned char *)(pData + offset), pCtx->buffer + offset);
245665 (void)memcpy_s(pData, cipherPageSize, pCtx->buffer, cipherPageSize);
245670 memcpyRc = memcpy_s(pCtx->buffer, cipherPageSize, pCtx->salt, FILE_HEADER_SIZE);
245676 rc = sqlite3CodecEncryptData(pCtx, OPERATE_CONTEXT_WRITE, pgno, cipherPageSize - offset, (unsigned char *)(pData + offset), pCtx->buffer + offset);
245681 return pCtx->buffer;
245685 memcpyRc = memcpy_s(pCtx->buffer, cipherPageSize, pCtx->salt, FILE_HEADER_SIZE);
245691 rc = sqlite3CodecEncryptData(pCtx, OPERATE_CONTEXT_READ, pgno, cipherPageSize - offset, (unsigned char *)(pData + offset), pCtx->buffer + offset);
245696 return pCtx->buffer;