Skip to content

Commit e372dcc

Browse files
committed
Tick DB-02/DB-03 (#558) as fixed in the code review tracker
1 parent a5e94bb commit e372dcc

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

CODE_REVIEW.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ Full per-finding detail (description, impact, proposed fix, file:line) is in `co
7878
| Done | ID | Sev | Conf | Title |
7979
|:--:|----|-----|------|-------|
8080
| [x] #553 | DB-01 | High | High | `isUnencrypted()` `getline()` makes the 16-byte magic compare unreliable + reads uninitialized stack on short files (security gate) |
81-
| [ ] | DB-02 | Med | High | `getHeaderInfo()` big-endian assembly is signed left-shift **UB**; sign-extends on LP64 |
82-
| [ ] | DB-03 | Med | High | `Header` struct uses platform-variable `unsigned long` → cross-platform field-width mismatch |
81+
| [x] #558 | DB-02 | Med | High | `getHeaderInfo()` big-endian assembly is signed left-shift **UB**; sign-extends on LP64 |
82+
| [x] #558 | DB-03 | Med | High | `Header` struct uses platform-variable `unsigned long` → cross-platform field-width mismatch |
8383
| [x] #552 | DB-04 | Med | High | Constructor `mFilename(apFilename)` is UB on a null `const char*` |
8484
| [ ] | DB-05 | Med | Med | `key()`/`rekey()` declared `const` but mutate the database |
8585
| [ ] | DB-06 | Low | High | `loadExtension()` discards SQLite's error message (passes `0` as `pzErrMsg`) |
@@ -224,7 +224,7 @@ Full per-finding detail (description, impact, proposed fix, file:line) is in `co
224224
- **Null C-pointer → `std::string`/`runtime_error` UB**: STMT-01, STMT-02, EXC-02, DB-04 (and the read in DB-01). A small, uniform "guard the pointer" pattern fixes all. _(STMT-01, STMT-02, EXC-02, DB-04 fixed in #552; DB-01 fixed in #553.)_
225225
- **Destructor error handling / terminal-state flags**: TXN-01, TXN-04, SP-02, SP-03 — library-wide habit of swallowing all exceptions and lacking a "finished" flag; route through `SQLITECPP_ASSERT`, broaden to `catch(...)`, track terminal state.
226226
- **`SQLITECPP_NODISCARD` macro**: requested by STMT-08, COL-09, BKP-01/03, EXC-03 — one feature-gated macro (like the existing `SQLITECPP_PURE_FUNC`) serves all; functionally important for `Backup::executeStep`.
227-
- **Fixed-width / sign correctness in header parsing**: DB-02 + DB-03.
227+
- **Fixed-width / sign correctness in header parsing**: DB-02 + DB-03. _(Both fixed in #558: `getHeaderInfo()` now assembles via a `uint32_t`-casting `readBE32` helper, and `Header` uses fixed-width `<cstdint>` types.)_
228228
- **Move-semantics consistency**: BKP-02, SP-05, TXN-05.
229229
- **Throw-from-destructor not propagated** _(2nd pass)_: SP-03 was fixed on this branch (afa51d3) but the identical defect remains in `Transaction` (**TXN-08**). One `catch(...)` finishes the job the branch started.
230230
- **Supply-chain / CI hardening** _(2nd pass, new scope)_: BLD-002 (stale gtest), BLD-003/BLD-005 (pin actions to SHAs + add `permissions:`), BLD-004 (dead Travis token), BLD-006 (gold linker + add a Linux ASan/UBSan CI job — also closes the verification ASAN gap).
@@ -247,7 +247,7 @@ Ranked by Severity × Likelihood × (inverse) Effort, with confidence. **P0** =
247247
### P1 — should fix (correctness / robustness / UB-by-design)
248248
| Done | # | Fix | Finding(s) | Files | Effort |
249249
|:--:|---|-----|-----------|-------|--------|
250-
| [ ] | 7 | Cast bytes to `uint32_t` before shifting in `getHeaderInfo()`; move `Header` to fixed-width types | DB-02, DB-03 | `src/Database.cpp`, `include/SQLiteCpp/Database.h` | M |
250+
| [x] #558 | 7 | Cast bytes to `uint32_t` before shifting in `getHeaderInfo()`; move `Header` to fixed-width types | DB-02, DB-03 | `src/Database.cpp`, `include/SQLiteCpp/Database.h` | M |
251251
| [x] #556 | 8 | Fix `operator<<` byte-count/eval-order (use `getString()` or sequence text-then-bytes) + BLOB test | COL-01 | `src/Column.cpp`, `tests/Column_test.cpp` | S |
252252
| [ ] | 9 | Broaden Savepoint destructor to `catch(...)`; add terminal-state flag; minimize dtor commands | SP-02, SP-03 | `src/Savepoint.cpp`, `include/SQLiteCpp/Savepoint.h` | M |
253253
| [ ] | 10 | Route swallowed destructor errors through `SQLITECPP_ASSERT`; add a single "finished" flag (Transaction + Savepoint) | TXN-01, TXN-04 | `src/Transaction.cpp`, `src/Savepoint.cpp` | M |

0 commit comments

Comments
 (0)