Author: pburba
Date: Wed Nov 16 17:50:22 2011
New Revision: 1202807

URL: http://svn.apache.org/viewvc?rev=1202807&view=rev
Log:
Fix a potential segfault during a merge.

Found by: steveking

See http://svn.haxx.se/dev/archive-2011-11/0261.shtml

* subversion/libsvn_client/merge.c
  (merge_props_changed): Account for the fact that the
   svn_wc_get_pristine_props API may return NULL pristine properties.

Modified:
    subversion/trunk/subversion/libsvn_client/merge.c

Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1202807&r1=1202806&r2=1202807&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Wed Nov 16 17:50:22 2011
@@ -1202,8 +1202,9 @@ merge_props_changed(svn_wc_notify_state_
                                                     scratch_pool,
                                                     scratch_pool));
 
-                  if (apr_hash_get(pristine_props, SVN_PROP_MERGEINFO,
-                                   APR_HASH_KEY_STRING))
+                  if (pristine_props
+                      && apr_hash_get(pristine_props, SVN_PROP_MERGEINFO,
+                                      APR_HASH_KEY_STRING))
                     has_pristine_mergeinfo = TRUE;
 
                   if (!has_pristine_mergeinfo && prop->value)


Reply via email to