Looking over __create_custom_diff_cmd() in ./subversion/libsvn_subr/io.c: (1) The function doesn't strip double quotes, e.g.
_create_custom_diff_cmd(..., /* cmd= */ "duff \"quoted\"", pool) will return the array { "duff", "\"quoted\"", NULL } You probably need to split cmd into tokens yourself (instead of using svn_cstring_split and then trying to fix up the result). (2) result = apr_palloc(pool, (words->nelts+1) * words->elt_size * sizeof(char *) ) Why is words->elt_size needed here - result is an array of char*? (3) Lifetime issue: result[argv] = word->data; word (and hence word->data) has been allocated in scratch_pool (which will be destroyed prior to return from __create_custom_diff_cmd), while result has been allocated in pool. Cheers, Roderich