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

Coredump when javahl SVNClient::diff() called with diff-cmd set

From: BURT, Matthew J <matthew.burt_at_nats.co.uk>
Date: Thu, 25 Oct 2018 10:41:18 +0000

Hi,

We've got a number of developers using the javahl bindings from Eclipse
via subclipse.

One of them recently reported a coredump against 1.10.3. I've also
reproduced it with 1.9.7.

The problem occurs when SVNClient::diff() is called with a diff-cmd
defined in the user's ~/.subversion/config file.

SVNClient::diff() calls svn_client_diff6() with the errstream explicitly
set to NULL and the diff command in dwi->diff_cmd.

Further down in the code, if diff_content_changed() from
subversion/libsvn_client/diff.c is called, the NULL errstream is
de-referenced with a call to svn_stream__aprfile().

I've put together a simple patch to avoid the null dereference, but I'm
not 100% sure this is the correct solution. The code suggests to me that
the intention is to allow the errstream parameter for svn_client_diff6()
to be set to NULL, but maybe I'm misreading it.

Is this the correct approach, and should I submit this patch for
consideration?

Thanks

***************************************************************************
If you are not the intended recipient, please notify our Help Desk at Email information.solutions_at_nats.co.uk
immediately. You should not copy or use this email or attachment(s) for any purpose nor disclose
their contents to any other person.

NATS computer systems may be monitored and communications carried on them recorded, to
secure the effective operation of the system.

Please note that neither NATS nor the sender accepts any responsibility for viruses or any losses
caused as a result of viruses and it is your responsibility to scan or otherwise check this email
and any attachments.

NATS means NATS (En Route) plc (company number: 4129273), NATS (Services) Ltd
(company number 4129270), NATSNAV Ltd (company number: 4164590)
or NATS Ltd (company number 3155567) or NATS Holdings Ltd (company number 4138218).
All companies are registered in England and their registered office is at 4000 Parkway,
Whiteley, Fareham, Hampshire, PO15 7FL.

***************************************************************************
Received on 2018-10-25 12:57:05 CEST

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

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