]> git.ipfire.org Git - thirdparty/tar.git/commit
Don’t assume mode_t fits in unsigned long
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 2 Aug 2024 07:27:40 +0000 (00:27 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 4 Aug 2024 08:41:43 +0000 (01:41 -0700)
commita78af4b95e53603a47e9d7971fc37f5d06cf14d8
tree8fac378315fc375dcbc80212109c60b19a00b78d
parentc26111742a3a63effd02ff225d79a0e6507e94bd
Don’t assume mode_t fits in unsigned long

* src/system.c (oct_to_env): Don’t assume mode_t fits in unsigned
long.  Do not output excess leading 1 bits.  When the mode is
zero, generate "0" rather than "00".  Use sprintf instead of
snprintf, since the output won’t be truncated; in general we don’t
use snprintf unless we want output to be truncated and truncation
is typically not GNU style.
src/system.c