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

bug in svn_client_copy wc to url

From: Alan Wood <Alan.Wood_at_clear.net.nz>
Date: Fri, 08 May 2009 21:46:42 +1200

Hi All,
 Just been trying to write tests for the first time ( in subversion that is ).
In the process I came across a seg fault when doing a svn copy wc to url.

There seems to be no check to see if a wc file exists before libsvn_client\copy.c line
1096 where it crashes on entry == NULL

 SVN_ERR(svn_wc_entry(&entry, pair->src, adm_access,
FALSE, iterpool));
 pair->src_revnum = entry->revision;

To match the wc to wc case it looks like there should be a file
exist check near the beginning of wc_to_repos_copy() perhaps in the
loop that creates the absolute paths

This has been checked with trunk and also with version 1.6.0
To reproduce:

svn cp not_a_file svn://server/repo/filename -m "log msg"

Tests done on windows.

Cheers
Alan Wood

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2108998
Received on 2009-05-08 11:47:41 CEST

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.