cherry-pick.FILE5_34-19-gfda25acb.appease-coverity-by-calling-umask-around-mkstemp-3.patch 444 B

1234567891011121314151617
  1. Subject: Appease coverity by calling umask around mkstemp(3)
  2. Origin: FILE5_34-19-gfda25acb <https://github.com/file/file/commit/FILE5_34-19-gfda25acb>
  3. Upstream-Author: Christos Zoulas <christos@zoulas.com>
  4. Date: Wed Aug 1 10:11:16 2018 +0000
  5. --- a/src/compress.c
  6. +++ b/src/compress.c
  7. @@ -397,7 +397,9 @@
  8. #else
  9. {
  10. int te;
  11. + int ou = umask(0);
  12. tfd = mkstemp(buf);
  13. + (void)umask(ou);
  14. te = errno;
  15. (void)unlink(buf);
  16. errno = te;