diff options
-rw-r--r-- | source3/modules/vfs_expand_msdfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/modules/vfs_expand_msdfs.c b/source3/modules/vfs_expand_msdfs.c index 46a6616db9..07fbe59825 100644 --- a/source3/modules/vfs_expand_msdfs.c +++ b/source3/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)); |