[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Code doesn't seem ... right

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Mon, 24 Jan 2011 17:22:57 -0500

[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?

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on 2011-01-24 23:23:41 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.