You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Chia-liang Kao <cl...@clkao.org> on 2006/02/18 00:03:01 UTC
[PATCH] fs_fs create segfaults on null config
==== Patch <fsfs-config-null> level 1
Source: [No source]
Target: 65390229-12b7-0310-b90b-f21a5aa7ec8e:/trunk:18513
(http://svn.collab.net/repos/svn)
Log:
Unbreak Perl bindings, fs->config can be null according to
svn_fs.h.
* subversion/libsvn_fs_fs/fs_fs.c
(svn_fs_fs__create): Don't assume fs->config is non-null.
Also remove a variable that is only used in the same test.
=== subversion/libsvn_fs_fs/fs_fs.c
==================================================================
--- subversion/libsvn_fs_fs/fs_fs.c (revision 18513)
+++ subversion/libsvn_fs_fs/fs_fs.c (patch fsfs-config-null level 1)
@@ -3995,7 +3995,6 @@
const char *path,
apr_pool_t *pool)
{
- const char *formatval;
int format = SVN_FS_FS__FORMAT_NUMBER;
fs->path = apr_pstrdup(pool, path);
@@ -4015,9 +4014,8 @@
SVN_ERR(svn_fs_fs__set_uuid(fs, svn_uuid_generate(pool), pool));
/* See if we had an explicitly requested no svndiff1. */
- formatval = apr_hash_get(fs->config, SVN_FS_CONFIG_NO_SVNDIFF1,
- APR_HASH_KEY_STRING);
- if (formatval)
+ if (fs->config && apr_hash_get(fs->config, SVN_FS_CONFIG_NO_SVNDIFF1,
+ APR_HASH_KEY_STRING))
format = 1;
SVN_ERR(write_revision_zero(fs));
==== BEGIN SVK PATCH BLOCK ====
Version: svk 1.06 (freebsd)
eJyFk01v0zAYxyshLv0EO/qQjQ1oF9t5aYpUdRKDoUlTtRckLkRO8qSN8OzKdiom+dILd66cEF9p
N/gsIBx3m3oALXKixM/z/z0vzvNGXb6aYjuZhDbAob14fzoez5gpF7vuK0gsVI2RKogthxXwgFou
50FkBbsGZzVMzcFMJtiJRxvxsRfcQ6KOUTAjhQ4yD8uNAgiwjaaxnRI7pU5qsTPKJYhcSWlcMDwK
k9hZ8y6nkksNeaft/OPOnwQ42giqRkHpAt50nrotVqB0I4Vn3nNox4nvOFsCix+A9B9AQreAh7wp
9ErktXbLZ/AonTzQo/vy6oZDQPH/uIf+OSx9Qo/y6YbvrWy55De5gc+mAm6Yj0mJhboOi5LQCOoQ
xzSKSwhZmtI4K+MiJS6vxJ3aWa/35Xu3nvqX7l7/ebL+DTsveuvbHbdh1rf4a2+2/hl+6/34uP61
29Rov9aDSSlF3czR3h7y19HsPD85ujjJT48/5BeX5+/O3h5Mo+1j9B24y65Ok6SkJGZZkVYFxQke
jWjGaAUJxWGU+kMkJLVXolDAPqEZKI6KRlSNmOuXaCuBkglUABIt54iVpVSdCzKyv+ntcDHs95+j
R9reR2j/YTPPSxfTwMEYvZbimUFM6/YatoM2GgkpBl3QYd+Xz7VECq7lChBDK6YaVnBAZsFM5ywF
v0Gthgo1wm0C0m6KkAFthv0AJ7bWDr5he+hkQqyrfzNXl37UxuMr0XQ1ML6bWDeIS2YWbioVrNxH
2zaVm7dDo1rxyf9AMaYBTWwS0ywkJBtgUqSD0HV3UGRhMagJZjFjKZQj+At/8lYH
==== END SVK PATCH BLOCK ====
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] fs_fs create segfaults on null config
Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 2/17/06, Chia-liang Kao <cl...@clkao.org> wrote:
> ==== Patch <fsfs-config-null> level 1
> Source: [No source]
> Target: 65390229-12b7-0310-b90b-f21a5aa7ec8e:/trunk:18513
> (http://svn.collab.net/repos/svn)
> Log:
> Unbreak Perl bindings, fs->config can be null according to
> svn_fs.h.
>
> * subversion/libsvn_fs_fs/fs_fs.c
> (svn_fs_fs__create): Don't assume fs->config is non-null.
> Also remove a variable that is only used in the same test.
This looks like it also exists in libsvn_fs_base, so I ported it to
the code there as well. Committed in r18514. Thanks!
-garrett
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org