On Mon, Jan 24, 2011 at 2:22 PM, C. Michael Pilato <cmpil...@collab.net> wrote: > [Using dev@ as a public TODO list to avoid pushing stack on a task.] > > In mod_dav_svn/mirror.c:dav_svn__location_body_filter() and > dav_svn__location_in_filter() are code blocks like this: > > if (uri.path) > canonicalized_uri = svn_urlpath__canonicalize(uri.path, r->pool); > else > canonicalized_uri = uri.path; > if (strcmp(canonicalized_uri, root_dir) == 0) { > [...] > > So ... if uri.path == NULL, then canonicalized_uri is set to NULL, and then > that NULL is used in a strcmp(). Won't that SEGFAULT?
It'd be difficult (if not outright impossible) to hit that else case. Follow apr_uri_parse and apr_pstrmemdup. Also know that we don't hit this code block if master_uri isn't set. The original code I wrote was just a straight strcmp - I believe the check for null is spurious. My $.02. -- justin