|
Line
Link Here
|
| 0 |
-- thttpd-2.25b.orig/libhttpd.c 2003-12-25 19:06:05.000000000 +0000 |
0 |
++ thttpd-2.25b/libhttpd.c 2006-12-24 01:43:56.208499592 +0000 |
|
Lines 1469-1475
Link Here
|
| 1469 |
httpd_realloc_str( &checked, &maxchecked, checkedlen ); |
1469 |
httpd_realloc_str( &checked, &maxchecked, checkedlen ); |
| 1470 |
(void) strcpy( checked, path ); |
1470 |
(void) strcpy( checked, path ); |
| 1471 |
/* Trim trailing slashes. */ |
1471 |
/* Trim trailing slashes. */ |
| 1472 |
while ( checked[checkedlen - 1] == '/' ) |
1472 |
while ( checkedlen && checked[checkedlen - 1] == '/' ) |
| 1473 |
{ |
1473 |
{ |
| 1474 |
checked[checkedlen - 1] = '\0'; |
1474 |
checked[checkedlen - 1] = '\0'; |
| 1475 |
--checkedlen; |
1475 |
--checkedlen; |
|
Lines 1488-1494
Link Here
|
| 1488 |
restlen = strlen( path ); |
1488 |
restlen = strlen( path ); |
| 1489 |
httpd_realloc_str( &rest, &maxrest, restlen ); |
1489 |
httpd_realloc_str( &rest, &maxrest, restlen ); |
| 1490 |
(void) strcpy( rest, path ); |
1490 |
(void) strcpy( rest, path ); |
| 1491 |
if ( rest[restlen - 1] == '/' ) |
1491 |
if ( restlen && rest[restlen - 1] == '/' ) |
| 1492 |
rest[--restlen] = '\0'; /* trim trailing slash */ |
1492 |
rest[--restlen] = '\0'; /* trim trailing slash */ |
| 1493 |
if ( ! tildemapped ) |
1493 |
if ( ! tildemapped ) |
| 1494 |
/* Remove any leading slashes. */ |
1494 |
/* Remove any leading slashes. */ |