model-writtenrun 3950 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Flavien GUEDEZ reported that corrupted TOAST data could make pglz_decompress read before its output buffer, supplying a reproducer and a patch checking both memcpy sites in #1.
- Tom Lane recommended moving the check into the existing corrupt-data guard so it would run once per match tag, explaining that dp - off remains constant during the copying loop in #2.
- Flavien GUEDEZ accepted that reasoning and supplied a smaller revision with a single consolidated check in #3.
- Tom Lane committed the revision with a safer offset-versus-produced-length comparison and clearer comments as 817669ea27, with 9b103f861e representing the same backported change; the commit message specifies backpatching through PostgreSQL 13.
- Tom Lane explained the pointer-wraparound concern and confirmed the push in #4, and Flavien GUEDEZ acknowledged the explanation in #5, leaving no outstanding revision in the thread.