model-writtenrun 6889 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Andres Freund reported spurious GCC 16 -O3 buffer-overflow warnings in contrib/pgcrypto/crypt-des.c and proposed replacing obscure pointer-subtraction loop bounds with an explicit byte counter #1.
- Ayush Tiwari reproduced the warning, agreed that the proposed rewrite was equivalent, and recommended updating the similar extended-DES loop for consistency #2.
- Ayush submitted a patch rewriting both loops with sizeof(keybuf) bounds and a size_t counter, preserving the extended-DES loop's key-termination condition #3.
- Pierre Forstmann reported successful testing and approved the patch after checking loop behavior with a C simulation; the supplied thread ends with the patch marked Ready for Committer #4.
- Tom Lane subsequently combined Ayush's loop contribution from #3 with the broader cleanup developed in thread #253946, introducing a byte/word union, simplifying DES helper interfaces, removing casts and unnecessary copies, and adapting the loops to indexed access; the resulting 35136da00e credits Ayush as co-author and records backpatching through PostgreSQL 14.