Refuse crafted .och files that would crash the store, without a core dump
- github
- github/openchronology/timeline-app
- commit
- main
- github/athanclark
A file could declare a generated column calling q_decimal('1e99999999999'): the rational functions were innocuous, so trusted_schema=OFF still ran it, and GMP killed the desktop app or och-convert with SIGFPE. - sqlite-rational: q_decimal takes exponents up to 10,000 either way, as the editor's parser does, and every function's arguments up to 1 MiB; larger inputs are an SQLITE_TOOBIG error. Only q_is_canonical, which the store's CHECK constraints use, stays innocuous; the rest are direct-only, so SQLite refuses a schema whose columns, defaults, indexes or views call them. - check_file refuses generated or hidden columns in every ordinary table before anything reads them. - och-convert sets RLIMIT_CORE to 0 and makes itself not dumpable, so a conversion stopped by a limit leaves no core dump on the server. Tests: crafted files with generated columns are refused by Snapshot::open, open and och-convert (which exits normally, with no signal); exponent and argument bounds in the store and the extension's own tests. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/openchronology/timeline-app/commit/63e004007a558147bf328a1b24be86b0ebdca4d8
Open Refuse crafted .och files that would crash the store, without a core dump in the timeline