This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH setup 3/5] Ignore malformed lines in a site-list


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]