From 9cb6b10efa3c7d50d3e686bda122121c61633419 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 29 Mar 2004 11:54:34 +0000 Subject: [PATCH] Without words... --- source/modules/vfs_expand_msdfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/modules/vfs_expand_msdfs.c b/source/modules/vfs_expand_msdfs.c index 46a6616db95..07fbe59825e 100644 --- a/source/modules/vfs_expand_msdfs.c +++ b/source/modules/vfs_expand_msdfs.c @@ -55,7 +55,7 @@ static BOOL read_target_host(const char *mapfile, pstring targethost) while ((s=x_fgets(buf, sizeof(buf), f)) != NULL) { - if (buf[strlen(buf)-1] == '\n') + if ((strlen(buf) > 0) && (buf[strlen(buf)-1] == '\n')) buf[strlen(buf)-1] = '\0'; DEBUG(10, ("Scanning line [%s]\n", buf)); -- 2.34.1