Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12:Update
zziplib.4426
zziplib-unzipcat-NULL-name.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File zziplib-unzipcat-NULL-name.patch of Package zziplib.4426
Index: zziplib-0.13.62/bins/unzzipcat.c =================================================================== --- zziplib-0.13.62.orig/bins/unzzipcat.c +++ zziplib-0.13.62/bins/unzzipcat.c @@ -91,8 +91,11 @@ main (int argc, char ** argv) for (; entry ; entry = zzip_disk_findnext(disk, entry)) { char* name = zzip_disk_entry_strdup_name (disk, entry); - printf ("%s\n", name); - free (name); + if (name) + { + printf ("%s\n", name); + free (name); + } } return 0; } @@ -112,10 +115,13 @@ main (int argc, char ** argv) for (; entry ; entry = zzip_disk_findnext(disk, entry)) { char* name = zzip_disk_entry_strdup_name (disk, entry); - if (! fnmatch (argv[argn], name, - FNM_NOESCAPE|FNM_PATHNAME|FNM_PERIOD)) - zzip_disk_cat_file (disk, name, stdout); - free (name); + if (name) + { + if (! fnmatch (argv[argn], name, + FNM_NOESCAPE|FNM_PATHNAME|FNM_PERIOD)) + zzip_disk_cat_file (disk, name, stdout); + free (name); + } } } return 0; Index: zziplib-0.13.62/zzip/fseeko.c =================================================================== --- zziplib-0.13.62.orig/zzip/fseeko.c +++ zziplib-0.13.62/zzip/fseeko.c @@ -300,7 +300,8 @@ zzip_entry_findfirst(FILE * disk) * central directory was written directly before : */ root = mapoffs - rootsize; } - } else if (zzip_disk64_trailer_check_magic(p)) + } else if ((p + sizeof(struct zzip_disk64_trailer)) <= (buffer + mapsize) + && zzip_disk64_trailer_check_magic(p)) { struct zzip_disk64_trailer *trailer = (struct zzip_disk64_trailer *) p;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor