Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Avoid the possibility of signed integer overflow with oversized precisions in %d conversions in the printf() implementation. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
ef3a7c877a7549b351aafd983cfa96c8 |
User & Date: | drh 2017-03-20 16:34:18.983 |
Context
2017-03-20
| ||
18:53 | Fix some problems in fts3 found by address-sanitizer. (check-in: 16a8e84fa7 user: dan tags: trunk) | |
16:34 | Avoid the possibility of signed integer overflow with oversized precisions in %d conversions in the printf() implementation. (check-in: ef3a7c877a user: drh tags: trunk) | |
16:06 | Do not run sync2.test as part of the "journaltest" permutation, as it uses "PRAGMA synchronous = off". (check-in: 285005a9bc user: dan tags: trunk) | |
Changes
Changes to src/printf.c.
︙ | ︙ | |||
396 397 398 399 400 401 402 | if( flag_zeropad && precision<width-(prefix!=0) ){ precision = width-(prefix!=0); } if( precision<etBUFSIZE-10-etBUFSIZE/3 ){ nOut = etBUFSIZE; zOut = buf; }else{ | | | > | 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 | if( flag_zeropad && precision<width-(prefix!=0) ){ precision = width-(prefix!=0); } if( precision<etBUFSIZE-10-etBUFSIZE/3 ){ nOut = etBUFSIZE; zOut = buf; }else{ u64 n = (u64)precision + 10 + precision/3; zOut = zExtra = sqlite3Malloc( n ); if( zOut==0 ){ setStrAccumError(pAccum, STRACCUM_NOMEM); return; } nOut = (int)n; } bufpt = &zOut[nOut-1]; if( xtype==etORDINAL ){ static const char zOrd[] = "thstndrd"; int x = (int)(longvalue % 10); if( x>=4 || (longvalue/10)%10==1 ){ x = 0; |
︙ | ︙ |