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

Re: Calling svn_client_commit on single file with nonrecursive set to true causes fubarness

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2003-04-29 19:52:56 CEST

cmpilato@collab.net writes:

> "Arild Fines" <arild.fines@broadpark.no> writes:
> > One of the tests in our testsuite(ankhsvn) picked up something which looks
> > like a regression from 0.20. If you call svn_client_commit on a single file
> > with the nonrecursive flag set to true, the whole thing bails out and
> > complains about an invalid path, the error message looking like this:
> >
> > Commit failed (details follow):
> > check_path: problem checking path "n:/tmp/wc/??????วแ<"
> Hm. My Windows build seems to be horked. Does the same thing happen
> if you use the Subversion client itself (instead of your test code),
> passing -N and a single file target?

You don't need a Windows build, valgrind on Unix shows that Arild's
analysis is correct. Using 'svn ci -N wc/foo' the problem occurs on
the *second* call to svn_path_condense_targets, with the code

                /* If a common prefix was found, condensed_targets
                   are given relative to that prefix. */
                if (basedir_len > 0)
                  rel_item += basedir_len + 1;
                (*((const char **)apr_array_push (*pcondensed_targets)))
                  = apr_pstrdup (pool, rel_item);

rel_item is an absolute path, something like "/home/pm/wc/foo", and
basedir_len is the strlen of that path. So adding basedir_len+1 to
rel_item produces a pointer to arbitrary memory.

Philip Martin
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Apr 29 19:53:42 2003

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.