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

[PATCH] svn merge -g crashes if there is no client side mergeinfo

From: Kamesh Jayachandran <kamesh_at_collab.net>
Date: 2007-05-24 12:18:18 CEST

Hi All,

Find the attached patch and log.

With regards
Kamesh Jayachandran

[[[
svn merge -g crashes if there is no client side mergeinfo.

* subversion/libsvn_client/log.c
  (svn_client__suggest_merge_sources):
   Fix segfault if 'svn_client_get_mergeinfo' sets NULL mergeinfo hash.

Patch by: kameshj
]]]

Index: subversion/libsvn_client/log.c
===================================================================
--- subversion/libsvn_client/log.c (revision 25131)
+++ subversion/libsvn_client/log.c (working copy)
@@ -238,6 +238,10 @@
 
   SVN_ERR(svn_client_get_mergeinfo(&mergeinfo, path_or_url, revision,
                                    ctx, pool));
+
+ if (!mergeinfo)
+ return SVN_NO_ERROR;
+
   for (hi = apr_hash_first(NULL, mergeinfo); hi; hi = apr_hash_next(hi))
     {
       const char *path;

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu May 24 12:18:07 2007

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.