Ignore malformed lines in a site-list, rather than crashing

Signed-off-by: Jon Turney <jon.tur...@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

Reply via email to