summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-11-16 01:27:51 +0000
committerAndrew Tridgell <tridge@samba.org>1998-11-16 01:27:51 +0000
commit13d0b57baa887f8b43b1ad2c41305e27b3528fbe (patch)
treee56d2cc363825f4ad0654c88dad72bac6e4f6ddb /source3
parent29cc8b8cd7326f0e83368f16d6666db3a674ae23 (diff)
downloadsamba-13d0b57baa887f8b43b1ad2c41305e27b3528fbe.tar.gz
samba-13d0b57baa887f8b43b1ad2c41305e27b3528fbe.tar.bz2
samba-13d0b57baa887f8b43b1ad2c41305e27b3528fbe.zip
fixed lmhosts parsing. We were using sizeof(name) where name was char*
(This used to be commit 67ba0b1ce335bc80e1c33fa28458ec9ebe5f446a)
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/namequery.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index f06ecc94e4..1398f7bc49 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/libsmb/namequery.c
@@ -344,8 +344,7 @@ FILE *startlmhosts(char *fname)
/********************************************************
Parse the next line in the lmhosts file.
*********************************************************/
-
-BOOL getlmhostsent( FILE *fp, char *name, int *name_type, struct in_addr *ipaddr)
+BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr)
{
pstring line;
@@ -370,7 +369,7 @@ BOOL getlmhostsent( FILE *fp, char *name, int *name_type, struct in_addr *ipaddr
if (next_token(&ptr,ip ,NULL,sizeof(ip)))
++count;
- if (next_token(&ptr,name ,NULL, sizeof(name)))
+ if (next_token(&ptr,name ,NULL, sizeof(pstring)))
++count;
if (next_token(&ptr,flags,NULL, sizeof(flags)))
++count;