You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2011/12/14 13:10:40 UTC

svn commit: r1214202 - /subversion/trunk/subversion/libsvn_repos/load-fs-vtable.c

Author: stsp
Date: Wed Dec 14 12:10:40 2011
New Revision: 1214202

URL: http://svn.apache.org/viewvc?rev=1214202&view=rev
Log:
* subversion/libsvn_repos/load-fs-vtable.c
  (apply_textdelta, set_fulltext): When skipping revisions, make sure
   to initialize output parameters to NULL before returning. Else, callers
   might try to use the returned window handler, or stream, respectively,
   and crash.

Reported by: Trent Nelson

Modified:
    subversion/trunk/subversion/libsvn_repos/load-fs-vtable.c

Modified: subversion/trunk/subversion/libsvn_repos/load-fs-vtable.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/load-fs-vtable.c?rev=1214202&r1=1214201&r2=1214202&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/load-fs-vtable.c (original)
+++ subversion/trunk/subversion/libsvn_repos/load-fs-vtable.c Wed Dec 14 12:10:40 2011
@@ -830,7 +830,10 @@ apply_textdelta(svn_txdelta_window_handl
 
   /* If we're skipping this revision, we're done here. */
   if (rb->skipped)
-    return SVN_NO_ERROR;
+    {
+      *handler = NULL;
+      return SVN_NO_ERROR;
+    }
 
   return svn_fs_apply_textdelta(handler, handler_baton,
                                 rb->txn_root, nb->path,
@@ -851,7 +854,10 @@ set_fulltext(svn_stream_t **stream,
 
   /* If we're skipping this revision, we're done here. */
   if (rb->skipped)
-    return SVN_NO_ERROR;
+    {
+      *stream = NULL;
+      return SVN_NO_ERROR;
+    }
 
   return svn_fs_apply_text(stream,
                            rb->txn_root, nb->path,