Author: stsp
Date: Sat Jan 30 17:11:30 2016
New Revision: 1727733
URL: http://svn.apache.org/viewvc?rev=1727733&view=rev
Log:
* subversion/libsvn_client/resolved.c
(svn_client_conflict_prop_get_resolution_options): Ensure that options
returned from here live in writable memory so that option->type_data
can be written to. Should fix access violation on Windows.
Found by: svn-windows-local buildbot
Modified:
subversion/trunk/subversion/libsvn_client/resolved.c
Modified: subversion/trunk/subversion/libsvn_client/resolved.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/resolved.c?rev=1727733&r1=1727732&r2=1727733&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/resolved.c (original)
+++ subversion/trunk/subversion/libsvn_client/resolved.c Sat Jan 30 17:11:30
2016
@@ -1038,8 +1038,13 @@ svn_client_conflict_prop_get_resolution_
sizeof(svn_client_conflict_option_t *));
for (i = 0; i < ARRAY_LEN(prop_conflict_options); i++)
{
- APR_ARRAY_PUSH((*options), const svn_client_conflict_option_t *) =
- &prop_conflict_options[i];
+ svn_client_conflict_option_t *option;
+
+ /* Property conflicts make use of type-specific data. We must make a
+ * mutable copy to make the memory for option->type_data writable. */
+ option = apr_pcalloc(result_pool, sizeof(*option));
+ *option = prop_conflict_options[i];
+ APR_ARRAY_PUSH((*options), const svn_client_conflict_option_t *) =
option;
}
return SVN_NO_ERROR;