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. Reviewed by: lulf MFC after: 1 week
This commit is contained in:
parent
72da547037
commit
6d6bc99ad2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=213300
@ -318,6 +318,14 @@ parse_deltatexts(struct rcsfile *rf, yyscan_t *sp, int token)
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user