This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
[PATCH setup 3/5] Ignore malformed lines in a site-list
- From: Jon Turney <jon dot turney at dronecode dot org dot uk>
- To: cygwin-apps at cygwin dot com
- Cc: Jon Turney <jon dot turney at dronecode dot org dot uk>
- Date: Fri, 18 Nov 2016 16:46:44 +0000
- Subject: [PATCH setup 3/5] Ignore malformed lines in a site-list
- Authentication-results: sourceware.org; auth=none
- References: <20161118164646.209716-1-jon.turney@dronecode.org.uk>
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