summary refs log tree commit diff stats
path: root/src/common
diff options
context:
space:
mode:
authorMark Jansen <learn0more@gmail.com>2017-05-28 12:46:26 +0200
committerTingPing <tingping@tingping.se>2017-07-16 17:26:33 -0400
commit0dccd8d3731fb136352c3f92c02cc1822cfcab45 (patch)
tree7519eb6060795d5822964440ac4eb95f7dc2fa52 /src/common
parentad359d7a04065728e8200d9e7aeef4e6e1453dba (diff)
servlist: skip empty lines.
Fixes #1999
Diffstat (limited to 'src/common')
-rw-r--r--src/common/servlist.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/servlist.c b/src/common/servlist.c
index 5e9192ea..53e02bf2 100644
--- a/src/common/servlist.c
+++ b/src/common/servlist.c
@@ -1005,6 +1005,8 @@ servlist_load (void)
 	while (fgets (buf, sizeof (buf) - 2, fp))
 	{
 		len = strlen (buf);
+		if (!len)
+			continue;
 		buf[len] = 0;
 		buf[len-1] = 0;	/* remove the trailing \n */
 		if (net)