Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.2:Ports
thttpd
thttpd-2.25b-zerolen.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File thttpd-2.25b-zerolen.patch of Package thttpd
--- libhttpd.c +++ libhttpd.c @@ -1471,7 +1471,7 @@ httpd_realloc_str( &checked, &maxchecked, checkedlen ); (void) strcpy( checked, path ); /* Trim trailing slashes. */ - while ( checked[checkedlen - 1] == '/' ) + while ( checkedlen && checked[checkedlen - 1] == '/' ) { checked[checkedlen - 1] = '\0'; --checkedlen; @@ -1490,7 +1490,7 @@ restlen = strlen( path ); httpd_realloc_str( &rest, &maxrest, restlen ); (void) strcpy( rest, path ); - if ( rest[restlen - 1] == '/' ) + if ( restlen && rest[restlen - 1] == '/' ) rest[--restlen] = '\0'; /* trim trailing slash */ if ( ! tildemapped ) /* Remove any leading slashes. */
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