From 13d0b57baa887f8b43b1ad2c41305e27b3528fbe Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 16 Nov 1998 01:27:51 +0000 Subject: fixed lmhosts parsing. We were using sizeof(name) where name was char* (This used to be commit 67ba0b1ce335bc80e1c33fa28458ec9ebe5f446a) --- source3/libsmb/namequery.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source3/libsmb/namequery.c') 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; -- cgit