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:
parent
29cc8b8cd7
commit
13d0b57baa
@ -344,8 +344,7 @@ FILE *startlmhosts(char *fname)
|
|||||||
/********************************************************
|
/********************************************************
|
||||||
Parse the next line in the lmhosts file.
|
Parse the next line in the lmhosts file.
|
||||||
*********************************************************/
|
*********************************************************/
|
||||||
|
BOOL getlmhostsent( FILE *fp, pstring name, int *name_type, struct in_addr *ipaddr)
|
||||||
BOOL getlmhostsent( FILE *fp, char *name, int *name_type, struct in_addr *ipaddr)
|
|
||||||
{
|
{
|
||||||
pstring line;
|
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)))
|
if (next_token(&ptr,ip ,NULL,sizeof(ip)))
|
||||||
++count;
|
++count;
|
||||||
if (next_token(&ptr,name ,NULL, sizeof(name)))
|
if (next_token(&ptr,name ,NULL, sizeof(pstring)))
|
||||||
++count;
|
++count;
|
||||||
if (next_token(&ptr,flags,NULL, sizeof(flags)))
|
if (next_token(&ptr,flags,NULL, sizeof(flags)))
|
||||||
++count;
|
++count;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user