Author: breser
Date: Sun Apr 14 18:07:42 2013
New Revision: 1467807
URL: http://svn.apache.org/r1467807
Log:
Fix a segfault with --internal-diff when no diff-cmd is set in the config.
This was introduced in r1464478, prior to that the NULL value would have
been handled in expand_option_value().
* subversion/libsvn_subr/config.c
(make_string_from_option): Check opt->value for NULL before using.
Suggested by: steveking
Modified:
subversion/trunk/subversion/libsvn_subr/config.c
Modified: subversion/trunk/subversion/libsvn_subr/config.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/config.c?rev=1467807&r1=1467806&r2=1467807&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/config.c (original)
+++ subversion/trunk/subversion/libsvn_subr/config.c Sun Apr 14 18:07:42 2013
@@ -464,7 +464,7 @@ make_string_from_option(const char **val
/* before attempting to expand an option, check for the placeholder.
* If none is there, there is no point in calling expand_option_value.
*/
- if (strchr(opt->value, '%'))
+ if (opt->value && strchr(opt->value, '%'))
{
apr_pool_t *tmp_pool = (x_pool ? x_pool :
svn_pool_create(cfg->x_pool));