mirror of
https://git.savannah.gnu.org/git/tar.git
synced 2026-08-18 07:17:20 +00:00
Prefer stdckdint.h to intprops.h
Problem reported by Collin Funk in: https://lists.gnu.org/r/bug-tar/2024-07/msg00000.html though this patch is more general than Collin’s suggestion. * src/compare.c (diff_multivol): * src/delete.c (move_archive): * src/sparse.c (oldgnu_add_sparse, pax_decode_header): * src/system.c (mtioseek): Prefer ckd_add and ckd_mul to the intprops.h equivalents, since stdckdint.h is now standard.
This commit is contained in:
+3
-3
@@ -52,9 +52,9 @@ move_archive (off_t count)
|
||||
idx_t short_size = position0 % record_size;
|
||||
idx_t start_offset = short_size ? record_size - short_size : 0;
|
||||
off_t increment, move_start;
|
||||
if (INT_MULTIPLY_WRAPV (record_size, count, &increment)
|
||||
|| INT_ADD_WRAPV (position0, start_offset, &move_start)
|
||||
|| INT_ADD_WRAPV (move_start, increment, &position)
|
||||
if (ckd_mul (&increment, record_size, count)
|
||||
|| ckd_add (&move_start, position0, start_offset)
|
||||
|| ckd_add (&position, move_start, increment)
|
||||
|| position < 0)
|
||||
{
|
||||
ERROR ((0, EOVERFLOW, "lseek: %s", archive_name_array[0]));
|
||||
|
||||
Reference in New Issue
Block a user