summaryrefslogtreecommitdiff
path: root/source3/passdb/smbpass.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/passdb/smbpass.c')
-rw-r--r--source3/passdb/smbpass.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/passdb/smbpass.c b/source3/passdb/smbpass.c
index 1579a5e00d..ec1a984b76 100644
--- a/source3/passdb/smbpass.c
+++ b/source3/passdb/smbpass.c
@@ -236,7 +236,9 @@ static struct smb_passwd *getsmbfilepwent(void *vp)
* Check if the string is terminated with a newline - if not
* then we must keep reading and discard until we get one.
*/
- linebuf_len = strlen(linebuf);
+ if ((linebuf_len = strlen(linebuf)) == 0)
+ continue;
+
if (linebuf[linebuf_len - 1] != '\n') {
c = '\0';
while (!ferror(fp) && !feof(fp)) {