diff options
author | DLL125 <134442578+DLL125@users.noreply.github.com> | 2023-09-24 10:18:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-24 10:18:54 +0200 |
commit | 2363506e099a8e55b6010f10f71ff8ea8e1c6dfc (patch) | |
tree | 3146efbbcc2cbcadd6e9d64463b5753c85c8dabe /src/Common/libzip/zip_source_file_stdio_named.c | |
parent | 937c5cd5cd57893e85601b472e7d6cfd5ffdc6ab (diff) | |
download | VeraCrypt-2363506e099a8e55b6010f10f71ff8ea8e1c6dfc.tar.gz VeraCrypt-2363506e099a8e55b6010f10f71ff8ea8e1c6dfc.zip |
Libzip 1.10.1 (#1209)
Updated to the latest version for the VeraCrypt 1.26.6 release.
Diffstat (limited to 'src/Common/libzip/zip_source_file_stdio_named.c')
-rw-r--r-- | src/Common/libzip/zip_source_file_stdio_named.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Common/libzip/zip_source_file_stdio_named.c b/src/Common/libzip/zip_source_file_stdio_named.c index 51e06a91..1495d7dd 100644 --- a/src/Common/libzip/zip_source_file_stdio_named.c +++ b/src/Common/libzip/zip_source_file_stdio_named.c @@ -101,7 +101,7 @@ zip_source_file(zip_t *za, const char *fname, zip_uint64_t start, zip_int64_t le ZIP_EXTERN zip_source_t * zip_source_file_create(const char *fname, zip_uint64_t start, zip_int64_t length, zip_error_t *error) { - if (fname == NULL || length < -1) { + if (fname == NULL || length < ZIP_LENGTH_UNCHECKED) { zip_error_set(error, ZIP_ER_INVAL, 0); return NULL; } @@ -291,7 +291,7 @@ static int create_temp_file(zip_source_file_context_t *ctx, bool create_file) { char *temp; int mode; struct stat st; - int fd; + int fd = 0; char *start, *end; if (stat(ctx->fname, &st) == 0) { @@ -359,7 +359,7 @@ static int create_temp_file(zip_source_file_context_t *ctx, bool create_file) { ctx->tmpname = temp; - return create_file ? fd : 0; + return fd; /* initialized to 0 if !create_file */ } |