Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:dirkmueller:acdc:as_python3_module
zoo
zoo-2.10-CAN-2005-2349.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File zoo-2.10-CAN-2005-2349.patch of Package zoo
Index: portable.c =================================================================== --- portable.c.orig 1991-07-11 21:07:34.000000000 +0200 +++ portable.c 2009-11-24 19:46:08.992658000 +0100 @@ -364,6 +364,31 @@ ZOOFILE zoo_file; show_dir(direntry); } #endif + char *p; + /* take off '../' */ + while ((p = strstr( direntry->dirname, "../" )) != NULL) { + while (*(p+3) != '\0') { + *p = *(p + 3); + p++; + } + *p = *(p+3); /* move last null */ + //printf("zoo: skipped \"../\" path component in '%s'\n", direntry->dirname); + } + /* take off '/' */ + if ( direntry->dirname[0] == '/' ) { + p = direntry->dirname; + while (*p != '\0') { + *p = *(p + 1); + p++; + } + *p = *(p+1); /* move last null */ + //printf("zoo: skipped \"/\" path component in '%s'\n", direntry->dirname); + } + /* take off '..' */ + if(!strcmp(direntry->dirname, "..")) + direntry->dirname[0] = '\0'; + /* direntry->dirlen = strlen(direntry->dirname); */ + return (0); }
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