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

malformed argument re-use in svn_client_url_from_path2

From: Maximo, Andre (GE Global Research) <maximo_at_ge.com>
Date: Thu, 24 Oct 2013 11:51:45 +0000

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_or_url, scratch_pool));

  The description of my developing environment is:

  O.S.: Windows 7
  Release: Subversion 1.8.3
  Compiler: MS Visual Studio 2010
  No modifications to SVN
  DB: FSFS
 Additional details: I replicate the problem using the same const char * variable in both arguments of the svn_dirent_get_absolute call (crashing in the same way) and made it to pass ok on this call by having another const char * as output. Replicated code snipet crashing:

  err = svn_dirent_get_absolute(&path, path, local_pool);

  And the ok code snipet:

  const char *local_path=NULL;
  err = svn_dirent_get_absolute(&local_path, path, local_pool);

  Should the function "svn_client_url_from_path2" have a "local_path_or_url" variable for output as all the other client functions that use "svn_dirent_get_absolute" have?

Thanks for your attention,

Andre Maximo, PhD
Information Visualization Researcher - Systems Integration
GE Global Research

T +55 21 3733 8190
M +55 21 6921 3377
maximo_at_ge.com

Rua Paulo Emidio Barbosa, 485 - Qd 1 A
Ilha do Fundao - Parque Tecnologico
Rio de Janeiro, 2194-615 Brazil

GE imagination at work
Received on 2013-10-24 16:08:39 CEST

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

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