VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/libzip/zip_set_name.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2018-03-18 23:13:40 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2018-03-18 23:13:40 +0100
commitcd7a01c34fc4304ef8161ee617568f274ace5d24 (patch)
tree41ed56e75a5feedc5f7d4fedb6338569d54d6076 /src/Common/libzip/zip_set_name.c
parent49a8e52139b960afd3913053380190cf2d03ceda (diff)
downloadVeraCrypt-cd7a01c34fc4304ef8161ee617568f274ace5d24.tar.gz
VeraCrypt-cd7a01c34fc4304ef8161ee617568f274ace5d24.zip
Windows: Update libzip to version 1.5.0 that include fixes for some security issues.
Diffstat (limited to 'src/Common/libzip/zip_set_name.c')
-rw-r--r--src/Common/libzip/zip_set_name.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/Common/libzip/zip_set_name.c b/src/Common/libzip/zip_set_name.c
index 34b76154..33fb4bc8 100644
--- a/src/Common/libzip/zip_set_name.c
+++ b/src/Common/libzip/zip_set_name.c
@@ -19,3 +19,3 @@
written permission.
-
+
THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
@@ -41,4 +41,3 @@
int
-_zip_set_name(zip_t *za, zip_uint64_t idx, const char *name, zip_flags_t flags)
-{
+_zip_set_name(zip_t *za, zip_uint64_t idx, const char *name, zip_flags_t flags) {
zip_entry_t *e;
@@ -61,4 +60,4 @@ _zip_set_name(zip_t *za, zip_uint64_t idx, const char *name, zip_flags_t flags)
if (name && name[0] != '\0') {
- /* TODO: check for string too long */
- if ((str=_zip_string_new((const zip_uint8_t *)name, (zip_uint16_t)strlen(name), flags, &za->error)) == NULL)
+ /* TODO: check for string too long */
+ if ((str = _zip_string_new((const zip_uint8_t *)name, (zip_uint16_t)strlen(name), flags, &za->error)) == NULL)
return -1;
@@ -71,3 +70,3 @@ _zip_set_name(zip_t *za, zip_uint64_t idx, const char *name, zip_flags_t flags)
/* TODO: encoding flags needed for CP437? */
- if ((i=_zip_name_locate(za, name, 0, NULL)) >= 0 && (zip_uint64_t)i != idx) {
+ if ((i = _zip_name_locate(za, name, 0, NULL)) >= 0 && (zip_uint64_t)i != idx) {
_zip_string_free(str);
@@ -78,3 +77,3 @@ _zip_set_name(zip_t *za, zip_uint64_t idx, const char *name, zip_flags_t flags)
/* no effective name change */
- if (i>=0 && (zip_uint64_t)i == idx) {
+ if (i >= 0 && (zip_uint64_t)i == idx) {
_zip_string_free(str);
@@ -83,3 +82,3 @@ _zip_set_name(zip_t *za, zip_uint64_t idx, const char *name, zip_flags_t flags)
- e = za->entry+idx;
+ e = za->entry + idx;
@@ -91,3 +90,3 @@ _zip_set_name(zip_t *za, zip_uint64_t idx, const char *name, zip_flags_t flags)
if (!same_as_orig && e->changes == NULL) {
- if ((e->changes=_zip_dirent_clone(e->orig)) == NULL) {
+ if ((e->changes = _zip_dirent_clone(e->orig)) == NULL) {
zip_error_set(&za->error, ZIP_ER_MEMORY, 0);
@@ -112,3 +111,3 @@ _zip_set_name(zip_t *za, zip_uint64_t idx, const char *name, zip_flags_t flags)
}
-
+
if (old_str) {