From b9fedcb2de5612bdb4e763fe0788e1a4a9c16d33 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 1 Jun 2000 21:00:37 +0000 Subject: param/loadparm.c: Looks like someone ran indent on this ! passdb/smbpass.c: Insure uninitialized memory reference fix. printing/nt_printing.c: rpc_server/srv_spoolss_nt.c: Insure memory leak fixes. smbd/unix_acls.c: Shadow ref fix. Jeremy. (This used to be commit d175d3ebefc053e9badd91ca5f2d8bd03eb6705d) --- source3/passdb/smbpass.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source3/passdb/smbpass.c') 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)) { -- cgit