aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2021-06-09 15:47:45 +0000
committerWerner Koch <[email protected]>2021-06-09 15:47:45 +0000
commit198b240b195596974e8b61e2b79fb6e8dc78f89a (patch)
tree6c0c67307e4a4d9c6f5bfb39bf73d5de0fab4437
parentsm: New option --ldapserver as an alias for --keyserver. (diff)
downloadgnupg-198b240b195596974e8b61e2b79fb6e8dc78f89a.tar.gz
gnupg-198b240b195596974e8b61e2b79fb6e8dc78f89a.zip
gpgtar,w32: Fix file size computation
* tools/gpgtar-create.c (fillup_entry_w32): Move parentheses. -- Fixes-commit: 8b8925a2bdbb12dd537dde20a27cdb1416c2f1ae The bug is so obvious that I wonder why it was not reported more often on Windows. (Adding 1 to MAXDWORD (0xfffffff) always gives 0 for the product). Signed-off-by: Werner Koch <[email protected]>
-rw-r--r--tools/gpgtar-create.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/gpgtar-create.c b/tools/gpgtar-create.c
index c196b96f6..f1b04853b 100644
--- a/tools/gpgtar-create.c
+++ b/tools/gpgtar-create.c
@@ -148,7 +148,7 @@ fillup_entry_w32 (tar_header_t hdr)
/* Only set the size for a regular file. */
if (hdr->typeflag == TF_REGULAR)
- hdr->size = (fad.nFileSizeHigh * (unsigned long long)(MAXDWORD+1)
+ hdr->size = (fad.nFileSizeHigh * ((unsigned long long)MAXDWORD+1)
+ fad.nFileSizeLow);
hdr->mtime = (((unsigned long long)fad.ftLastWriteTime.dwHighDateTime << 32)