You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2014/04/16 17:32:23 UTC
svn commit: r1587946 - /subversion/trunk/subversion/libsvn_client/merge.c
Author: julianfoad
Date: Wed Apr 16 15:32:23 2014
New Revision: 1587946
URL: http://svn.apache.org/r1587946
Log:
Fix a potential problem in merge. The code used a stack variable after it had gone
out of scope.
Found by the Clang compiler's Address Sanitizer.
* subversion/libsvn_client/merge.c
(merge_locked): Tweak to avoid using a stack variable outside its scope.
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=1587946&r1=1587945&r2=1587946&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Wed Apr 16 15:32:23 2014
@@ -10469,15 +10469,10 @@ merge_locked(conflict_report_t **conflic
}
else
{
- merge_source_t source;
-
- source.loc1 = source1_loc;
- source.loc2 = source2_loc;
- source.ancestral = FALSE;
-
/* Build a single-item merge_source_t array. */
merge_sources = apr_array_make(scratch_pool, 1, sizeof(merge_source_t *));
- APR_ARRAY_PUSH(merge_sources, merge_source_t *) = &source;
+ APR_ARRAY_PUSH(merge_sources, merge_source_t *)
+ = merge_source_create(source1_loc, source2_loc, FALSE, scratch_pool);
}
err = do_merge(NULL, NULL, conflict_report, &use_sleep,