RE: malformed argument re-use in svn_client_url_from_path2

2013-10-29 Thread Maximo, Andre (GE Global Research)
, October 25, 2013 10:31 AM To: 'Ben Reser'; Bert Huijben; users@subversion.apache.org Subject: RE: malformed argument re-use in svn_client_url_from_path2 Thanks Bert again and Ben for joining. I am handling the error in the code (I just omitted for clarity), but the execution I am

Re: malformed argument re-use in svn_client_url_from_path2

2013-10-25 Thread Bert Huijben
I'm pretty sure you already handle this, but make sure that all paths you pass to Subversion APIs are in theSubversion canonical C:/WD form. All APIs except for a few conversion APIs in the svn_dirent_* namespace assume canonical paths for their arguments. (There are some legacy conversion AP

Re: malformed argument re-use in svn_client_url_from_path2

2013-10-25 Thread Branko Čibej
On 25.10.2013 14:31, Maximo, Andre (GE Global Research) wrote: > Thanks Bert again and Ben for joining. > > I am handling the error in the code (I just omitted for clarity), but the > execution I am describing never throws an error. I also have tested passing > the same pool and using the GetBu

RE: malformed argument re-use in svn_client_url_from_path2

2013-10-25 Thread Maximo, Andre (GE Global Research)
problem? Best, Andre. -Original Message- From: Ben Reser [mailto:b...@reser.org] Sent: Thursday, October 24, 2013 6:36 PM To: Maximo, Andre (GE Global Research); Bert Huijben; users@subversion.apache.org Subject: Re: malformed argument re-use in svn_client_url_from_path2 On 10/24/13

Re: malformed argument re-use in svn_client_url_from_path2

2013-10-24 Thread Branko Čibej
On 24.10.2013 22:36, Ben Reser wrote: > On 10/24/13 11:44 AM, Maximo, Andre (GE Global Research) wrote: >> void CVCS::svnURLPath(CString& urlPath, const CString &fullPath) >> >> { >> >> apr_pool_t *local_pool = svn_pool_create(m_svn_pool); >> >> const char *url = NULL; >> >> svn_error_t *err

Re: malformed argument re-use in svn_client_url_from_path2

2013-10-24 Thread Ben Reser
On 10/24/13 11:44 AM, Maximo, Andre (GE Global Research) wrote: > void CVCS::svnURLPath(CString& urlPath, const CString &fullPath) > > { > > apr_pool_t *local_pool = svn_pool_create(m_svn_pool); > > const char *url = NULL; > > svn_error_t *err = svn_client_url_from_path2(&url, fullPath, m

Re: malformed argument re-use in svn_client_url_from_path2

2013-10-24 Thread Branko Čibej
On 24.10.2013 20:44, Maximo, Andre (GE Global Research) wrote: > > Hi Bert, > > > > thanks for your prompt reply. Here is the code: > > > > void CVCS::svnURLPath(CString& urlPath, const CString &fullPath) > > { > > apr_pool_t *local_pool = svn_pool_create(m_svn_pool); > > const char *url

Re: malformed argument re-use in svn_client_url_from_path2

2013-10-24 Thread Ben Reser
On 10/24/13 11:44 AM, Maximo, Andre (GE Global Research) wrote: > void CVCS::svnURLPath(CString& urlPath, const CString &fullPath) > > { > > apr_pool_t *local_pool = svn_pool_create(m_svn_pool); > > const char *url = NULL; > > svn_error_t *err = svn_client_url_from_path2(&url, fullPath, m

RE: malformed argument re-use in svn_client_url_from_path2

2013-10-24 Thread Bert Huijben
@subversion.apache.org Subject: RE: malformed argument re-use in svn_client_url_from_path2 Hi Bert, thanks for your prompt reply. Here is the code: void CVCS::svnURLPath(CString& urlPath, const CString &fullPath) { apr_pool_t *local_pool = svn_pool_create(m_svn_pool); const c

RE: malformed argument re-use in svn_client_url_from_path2

2013-10-24 Thread Maximo, Andre (GE Global Research)
f I passed a non-existent fullPath, the code crashes at the “svn_client_url_from_path2”. Best, Andre. From: Bert Huijben [mailto:b...@qqmail.nl] Sent: Thursday, October 24, 2013 4:03 PM To: Maximo, Andre (GE Global Research); users@subversion.apache.org Subject: Re: malformed argume

Re: malformed argument re-use in svn_client_url_from_path2

2013-10-24 Thread Bert Huijben
Without more context I can't see what is wrong with the original code. The second argument is passed by value and the local value is overwritten only in the function when the old pointer is never used again. This is valid in C and this code is tested by our testsuite as far as I can tell. Do

malformed argument re-use in svn_client_url_from_path2

2013-10-24 Thread Maximo, Andre (GE Global Research)
Hi, the function "svn_client_url_from_path2" in "libsvn_client/url.c" re-uses the const char* argument "path_or_url" as both output and input of the svn_dirent_get_absolute call and this causes the function to crash. The crashing line is: SVN_ERR(svn_dirent_get_absolute(&path_or_url, path_o