$OpenBSD: patch-lib_libconfig_c,v 1.1 2008/04/23 13:33:22 ajacoutot Exp $
--- lib/libconfig.c.orig	Wed Apr 23 12:03:13 2008
+++ lib/libconfig.c	Wed Apr 23 12:05:47 2008
@@ -344,7 +344,7 @@ void config_read_file(const char *filename)
 		/* end of line */
 		buf[--len] = '\0';
 
-		if (buf[len-1] == '\\') {
+		if (len && buf[len-1] == '\\') {
 		    /* line continuation */
 		    len--;
 		    lineno++;
