1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-11 16:58:40 +03:00

fixed lmhosts parsing. We were using sizeof(name) where name was char*

(This used to be commit 67ba0b1ce335bc80e1c33fa28458ec9ebe5f446a)
This commit is contained in:
Andrew Tridgell 1998-11-16 01:27:51 +00:00
parent 29cc8b8cd7
commit 13d0b57baa

View File

@ -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;