Up to [local] / src / usr.bin / compress
Request diff between arbitrary revisions
Default branch: MAIN
Current tag: OPENBSD_7_3_BASE
Revision 1.104 / (download) - annotate - [select for diffs], Wed Oct 26 00:40:40 2022 UTC (19 months, 2 weeks ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE,
OPENBSD_7_3
Changes since 1.103: +81 -76 lines
Diff to previous 1.103 (colored)
compress: fix minor TOCTOU when checking for existing file Use open(2) + fstat(2) instead of stat(2) + open(2). The file open code has been moved into its own functions so it can be shared between docompress() and dodecompress().