From d6d412c49e47027a38698d906f6ad853c8674582 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Sat, 11 Mar 2017 20:46:32 +0100 Subject: [PATCH] Limit the size of strings we read from RCS This calms down Coverity which fears than an evil RCS repository would break LyX. --- src/VCBackend.cpp | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.39.5