Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Avoid all memory allocation (and hence the possiblitity of OOM failure) in sqlite3_value_double() and sqlite3_column_double(). |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
4afdf9705a7c2b67aea31c5d51b9c295 |
User & Date: | drh 2010-10-05 12:05:32.000 |
Context
2010-10-05
| ||
15:41 | If walLockExclusive() fails for reasons other than SQLITE_BUSY inside of walRestartLog() then propagate that error back up to the application. (check-in: 04dcba6b33 user: drh tags: trunk) | |
12:05 | Avoid all memory allocation (and hence the possiblitity of OOM failure) in sqlite3_value_double() and sqlite3_column_double(). (check-in: 4afdf9705a user: drh tags: trunk) | |
11:33 | Fix an assert() failing on OSX. (check-in: dca8763872 user: dan tags: trunk) | |
Changes
Changes to src/vdbemem.c.
︙ | ︙ | |||
389 390 391 392 393 394 395 | if( pMem->flags & MEM_Real ){ return pMem->r; }else if( pMem->flags & MEM_Int ){ return (double)pMem->u.i; }else if( pMem->flags & (MEM_Str|MEM_Blob) ){ /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */ double val = (double)0; | < < < < < < < | | 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 | if( pMem->flags & MEM_Real ){ return pMem->r; }else if( pMem->flags & MEM_Int ){ return (double)pMem->u.i; }else if( pMem->flags & (MEM_Str|MEM_Blob) ){ /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */ double val = (double)0; sqlite3AtoF(pMem->z, &val, pMem->n, pMem->enc); return val; }else{ /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */ return (double)0; } } |
︙ | ︙ |