[PATCH setup 3/5] Ignore malformed lines in a site-list
Jon Turney
jon.turney@dronecode.org.uk
Fri Nov 18 16:47:00 GMT 2016
Ignore malformed lines in a site-list, rather than crashing
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
---
site.cc | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/site.cc b/site.cc
index 677672e..1485096 100644
--- a/site.cc
+++ b/site.cc
@@ -281,6 +281,11 @@ load_site_list (SiteList& theSites, char *theString)
}
}
}
+
+ /* Ignore malformed lines */
+ if (!semi || !semi2 || !semi3)
+ continue;
+
site_list_type newsite (bol, semi, semi2, semi3);
SiteList::iterator i = find (theSites.begin(),
theSites.end(), newsite);
--
2.8.3
More information about the Cygwin-apps
mailing list