Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 331747 | Differences between
and this patch

Collapse All | Expand All

(-)thttpd-2.25b.orig/libhttpd.c (-2 / +5 lines)
Lines 2322-2329 Link Here
2322
	{
2320
	{
2323
	int i;
2321
	int i;
2324
	i = strlen( hc->origfilename ) - strlen( hc->pathinfo );
2322
	i = strlen( hc->origfilename ) - strlen( hc->pathinfo );
2325
	if ( i > 0 && strcmp( &hc->origfilename[i], hc->pathinfo ) == 0 )
2323
	if ( strcmp( &hc->origfilename[i], hc->pathinfo ) == 0 )
2326
	    hc->origfilename[i - 1] = '\0';
2324
	    {
2325
	    if ( i == 0 ) hc->origfilename[0] = '\0';
2326
	    else hc->origfilename[i - 1] = '\0';
2327
	    }
2327
	}
2328
	}
2328
2329
2329
    /* If the expanded filename is an absolute path, check that it's still
2330
    /* If the expanded filename is an absolute path, check that it's still

Return to bug 331747