[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

crash when diffing, using 1.8.x

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Sun, 14 Apr 2013 18:47:20 +0200

Hi,

Easy to reproduce:

$ cd workingcopy
$ svn diff . --internal-diff

If you pass --internal-diff, then svn_config_set() is called with NULL
as the value to remove it.
However when doing the diff, config.c, make_string_from_option later
uses that NULL value:

if (strchr(opt->value, '%'))

opt-value here is NULL, and therefore strchr crashes.

I suggest changing that line to
if (opt->value && strchr(opt->value, '%'))

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest interface to (Sub)version control
    /_/   \_\     http://tortoisesvn.net
Received on 2013-04-14 18:47:55 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.