svn commit: r213732 - stable/8/contrib/csup
    John Baldwin 
    jhb at FreeBSD.org
       
    Tue Oct 12 17:12:13 UTC 2010
    
    
  
Author: jhb
Date: Tue Oct 12 17:12:13 2010
New Revision: 213732
URL: http://svn.freebsd.org/changeset/base/213732
Log:
  MFC 213300:
  If an RCS file is truncated, rcsfile_getdelta() will return NULL.  Instead
  of faulting, check for NULL.  However, returning an error would cause csup
  to just abort the entire update.  Instead, break out of the loop and
  return ok.  The attempts to update the file will trigger a MD5 failure which
  will cause csup to download the entire file as a fixup.
Modified:
  stable/8/contrib/csup/rcsparse.c
Directory Properties:
  stable/8/contrib/csup/   (props changed)
Modified: stable/8/contrib/csup/rcsparse.c
==============================================================================
--- stable/8/contrib/csup/rcsparse.c	Tue Oct 12 17:09:33 2010	(r213731)
+++ stable/8/contrib/csup/rcsparse.c	Tue Oct 12 17:12:13 2010	(r213732)
@@ -318,6 +318,14 @@ parse_deltatexts(struct rcsfile *rf, yys
 		d = rcsfile_getdelta(rf, revnum);
 		free(revnum);
 
+		/*
+		 * XXX: The RCS file is corrupt, but lie and say it is ok.
+		 * If it is actually broken, then the MD5 mismatch will
+		 * trigger a fixup.
+		 */
+		if (d == NULL)
+			return (0);
+
 		/* log string */
 		asserttoken(sp, KEYWORD);
 		asserttoken(sp, STRING);
    
    
More information about the svn-src-stable-8
mailing list