mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 19:08:26 -06:00
Windows: Update libzip to version 1.5.0 that include fixes for some security issues.
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
3. The names of the authors may not be used to endorse or promote
|
||||
products derived from this software without specific prior
|
||||
written permission.
|
||||
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
|
||||
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
@@ -41,15 +41,13 @@
|
||||
|
||||
|
||||
ZIP_EXTERN zip_int64_t
|
||||
zip_name_locate(zip_t *za, const char *fname, zip_flags_t flags)
|
||||
{
|
||||
zip_name_locate(zip_t *za, const char *fname, zip_flags_t flags) {
|
||||
return _zip_name_locate(za, fname, flags, &za->error);
|
||||
}
|
||||
|
||||
|
||||
zip_int64_t
|
||||
_zip_name_locate(zip_t *za, const char *fname, zip_flags_t flags, zip_error_t *error)
|
||||
{
|
||||
_zip_name_locate(zip_t *za, const char *fname, zip_flags_t flags, zip_error_t *error) {
|
||||
int (*cmp)(const char *, const char *);
|
||||
const char *fn, *p;
|
||||
zip_uint64_t i;
|
||||
@@ -62,23 +60,23 @@ _zip_name_locate(zip_t *za, const char *fname, zip_flags_t flags, zip_error_t *e
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (flags & (ZIP_FL_NOCASE|ZIP_FL_NODIR|ZIP_FL_ENC_CP437)) {
|
||||
if (flags & (ZIP_FL_NOCASE | ZIP_FL_NODIR | ZIP_FL_ENC_CP437)) {
|
||||
/* can't use hash table */
|
||||
cmp = (flags & ZIP_FL_NOCASE) ? strcasecmp : strcmp;
|
||||
|
||||
for (i=0; i<za->nentry; i++) {
|
||||
for (i = 0; i < za->nentry; i++) {
|
||||
fn = _zip_get_name(za, i, flags, error);
|
||||
|
||||
|
||||
/* newly added (partially filled) entry or error */
|
||||
if (fn == NULL)
|
||||
continue;
|
||||
|
||||
|
||||
if (flags & ZIP_FL_NODIR) {
|
||||
p = strrchr(fn, '/');
|
||||
if (p)
|
||||
fn = p+1;
|
||||
fn = p + 1;
|
||||
}
|
||||
|
||||
|
||||
if (cmp(fname, fn) == 0) {
|
||||
_zip_error_clear(error);
|
||||
return (zip_int64_t)i;
|
||||
|
||||
Reference in New Issue
Block a user