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

Re: Perl/Ruby bindings fail in trunk

From: Kouhei Sutou <kou_at_cozmixng.org>
Date: Thu, 13 Nov 2008 22:43:38 +0900 (JST)

Hi,

In <f16625f20811121745q6ef836f6w196068a04665ac45_at_mail.gmail.com>
  "Re: Perl/Ruby bindings fail in trunk" on Wed, 12 Nov 2008 18:45:22 -0700,
  "Jeremy Whitlock" <jcscoobyrs_at_gmail.com> wrote:

> > All tests before that one passed on Linux. The segfault kills the test run,
> > so I do not know if there will be more errors.
>
> I can confirm this as well.

It seems that r33975 misses NULL checks.

{{{
Add missing NULL checks.

* subversion/libsvn_fs_fs/tree.c
  (fs_file_checksum, apply_textdelta): Add missing NULL check.
}}}

Thanks,

--
kou

Index: subversion/libsvn_fs_fs/tree.c
===================================================================
--- subversion/libsvn_fs_fs/tree.c (revision 34171)
+++ subversion/libsvn_fs_fs/tree.c (working copy)
@@ -2256,7 +2256,10 @@
 
   SVN_ERR(get_dag(&file, root, path, pool));
   SVN_ERR(svn_fs_fs__dag_file_checksum(&file_checksum, file, pool));
- *checksum = (file_checksum->kind == kind) ? file_checksum : NULL;
+ if (file_checksum && file_checksum->kind == kind)
+ *checksum = file_checksum;
+ else
+ *checksum = NULL;
   return SVN_NO_ERROR;
 }
 
@@ -2426,7 +2429,8 @@
       /* Until we finalize the node, its data_key points to the old
          contents, in other words, the base text. */
       SVN_ERR(svn_fs_fs__dag_file_checksum(&checksum, tb->node, pool));
- if (tb->base_checksum->kind == checksum->kind
+ if (checksum
+ && tb->base_checksum->kind == checksum->kind
           && !svn_checksum_match(tb->base_checksum, checksum))
         return svn_error_createf
           (SVN_ERR_CHECKSUM_MISMATCH,

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-11-13 14:43:58 CET

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.