]> git.ipfire.org Git - thirdparty/tar.git/commit
Simplify read_header overflow checking
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 31 Jul 2024 00:47:10 +0000 (17:47 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 4 Aug 2024 08:41:43 +0000 (01:41 -0700)
commit8a3fc529729acf38276b27f6b7bc50962dfab799
treee872c9e5656c868e2ce53ed7ac3822104b4eed1c
parent927d67855e2e83b6b06eb9095f65e4e695d6af7e
Simplify read_header overflow checking

* src/list.c (read_header): Use ckd_add instead of
doing overflow checking by hand.  Although the old code
was correct on all practical hosts, the new code is simpler
and works even on weird hosts where SIZE_MAX <= INT_MAX.
src/list.c