[prev in list] [next in list] [prev in thread] [next in thread]
List: lyx-cvs
Subject: [LyX/master] When scanning CVS skip unreadable lines
From: Jean-Marc Lasgouttes <lasgouttes () lyx ! org>
Date: 2017-03-31 9:34:32
Message-ID: 20170331093432.6D8BD280259 () lyx ! lyx ! org
[Download RAW message or body]
commit d54578a95166e0b1007ff3e388bd88f809fa76bd
Author: Jean-Marc Lasgouttes <lasgouttes@lyx.org>
Date: Fri Mar 31 11:33:34 2017 +0200
When scanning CVS skip unreadable lines
Spotted by coverity.
---
src/VCBackend.cpp | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/VCBackend.cpp b/src/VCBackend.cpp
index e4104bd..a152a28 100644
--- a/src/VCBackend.cpp
+++ b/src/VCBackend.cpp
@@ -569,10 +569,10 @@ void CVS::scanMaster()
if (contains(line, tmpf)) {
// Ok extract the fields.
smatch sm;
-
- // false positive from coverity
- // coverity[CHECKED_RETURN]
- regex_match(line, sm, reg);
+ if (!regex_match(line, sm, reg)) {
+ LYXERR(Debug::LYXVC, "\t Cannot parse line. Skipping.");
+ continue;
+ }
//sm[0]; // whole matched string
//sm[1]; // filename
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic