diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-11-16 01:27:51 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-11-16 01:27:51 +0000 |
commit | 67ba0b1ce335bc80e1c33fa28458ec9ebe5f446a (patch) | |
tree | 78cb38a08c69afe4bbfa326cf3eaff89b2f6be1b /source/libsmb/namequery.c | |
parent | 5f7d9d4656eb501e14b98f4ae1990a791c7901e3 (diff) | |
download | samba-67ba0b1ce335bc80e1c33fa28458ec9ebe5f446a.tar.gz samba-67ba0b1ce335bc80e1c33fa28458ec9ebe5f446a.tar.xz samba-67ba0b1ce335bc80e1c33fa28458ec9ebe5f446a.zip |
fixed lmhosts parsing. We were using sizeof(name) where name was char*
Diffstat (limited to 'source/libsmb/namequery.c')
-rw-r--r-- | source/libsmb/namequery.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/libsmb/namequery.c b/source/libsmb/namequery.c index f06ecc94e40..1398f7bc492 100644 --- a/source/libsmb/namequery.c +++ b/source/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; |