From: Jean-Marc Lasgouttes Date: Sat, 11 Mar 2017 19:46:32 +0000 (+0100) Subject: Limit the size of strings we read from RCS X-Git-Tag: 2.3.0alpha1~226 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=d6d412c49e47027a38698d906f6ad853c8674582;p=features.git Limit the size of strings we read from RCS This calms down Coverity which fears than an evil RCS repository would break LyX. --- diff --git a/src/VCBackend.cpp b/src/VCBackend.cpp index b395a0d2b2..3eeb3d6a3e 100644 --- a/src/VCBackend.cpp +++ b/src/VCBackend.cpp @@ -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;