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

[PATCH] Fix repos->capability assumption in repos hook

From: Chia-liang Kao <clkao_at_clkao.org>
Date: Sat, 7 Jun 2008 17:16:13 +0800

Hi,

It seems svn_repos_remember_client_capabilities is only called in the
ra server side, in other words, if you use the repos api, you can get
a repos object without client_capabilities set which is optional as
repos.h indicates.

However, the svn_repos__hooks_start_commit function assumes capability
is not null, which causes segfault if you have a repository with
enabled start-commit hooks and is being committed with the repos API.
Attached is a patch for this.

I am also wondering why the code has the caller (the only one is
svn_repos_fs_begin_txn_for_commit2) passing the capabilities in rather
than pulling it from repos? the latter seems more encapsulated to
me...

[[[

* subversion/libsvn_repos/hook.c
  (svn_repos__hooks_start_commit): Don't assume capabilities is non-null.

]]]

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org

Received on 2008-06-07 11:16:24 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.