fixed lmhosts parsing. We were using sizeof(name) where name was char*
authorAndrew Tridgell <tridge@samba.org>
Mon, 16 Nov 1998 01:27:51 +0000 (01:27 +0000)
committerAndrew Tridgell <tridge@samba.org>
Mon, 16 Nov 1998 01:27:51 +0000 (01:27 +0000)
source/libsmb/namequery.c

index f06ecc94e4047678d49eace075dc9f6b020dffe9..1398f7bc492fbb83bebfd1fc3295fb212c1a81b2 100644 (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;