Limit the size of strings we read from RCS

This calms down Coverity which fears than an evil RCS repository would break LyX.
This commit is contained in:
Jean-Marc Lasgouttes 2017-03-11 20:46:32 +01:00
parent fe5807483d
commit d6d412c49e

View File

@ -170,6 +170,8 @@ void RCS::scanMaster()
LYXERR(Debug::LYXVC, "LyXVC::RCS: scanMaster: " << master_);
ifstream ifs(master_.toFilesystemEncoding().c_str());
// limit the size of strings we read to avoid memory problems
ifs >> setw(65636);
string token;
bool read_enough = false;