From 4c319ad04699b236d038d141323c7586c5bf0983 Mon Sep 17 00:00:00 2001 From: Samba Release Account Date: Mon, 25 Aug 1997 22:18:31 +0000 Subject: charset.c : Add mapping for code page 932 (KANJI). client.c : Fix crash bug. Add code to use BUFFER_SIZE for NetServerEnum calls. namepacket.c: Fixed cast. nmbsync.c : Add code to use BUFFER_SIZE for NetServerEnum calls. smb.h : Set default client code page to 932 for KANJI. system.c : Remove vendor specific code that crept in :-). util.c : Added #define to allow Samba to behave as Win95 when doing KANJI case insensitivity tests. Jeremy (jallison@whistle.com) (This used to be commit 7f7d2faa07b81ad435b2acc9318bc39d813020c6) --- source3/client/client.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source3/client') diff --git a/source3/client/client.c b/source3/client/client.c index f9585c6de5..329956ce94 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -232,7 +232,8 @@ static int readfile(char *b, int size, int n, FILE *f) n++; } - b[i++] = c; + if(i < n) + b[i++] = c; } return(i); @@ -3878,7 +3879,7 @@ static BOOL list_servers(char *wk_grp) p = skip_string(p,1); SSVAL(p,0,uLevel); - SSVAL(p,2,0x2000); /* buf length */ + SSVAL(p,2,BUFFER_SIZE - SAFETY_MARGIN); /* buf length */ p += 4; svtype_p = p; @@ -3893,7 +3894,7 @@ static BOOL list_servers(char *wk_grp) SIVAL(svtype_p,0,SV_TYPE_ALL); if (call_api(PTR_DIFF(p+4,param),0, - 8,10000, + 8,BUFFER_SIZE - SAFETY_MARGIN, &rprcnt,&rdrcnt, param,NULL, &rparam,&rdata)) @@ -3932,7 +3933,7 @@ static BOOL list_servers(char *wk_grp) SIVAL(svtype_p,0,SV_TYPE_DOMAIN_ENUM); if (call_api(PTR_DIFF(p+4,param),0, - 8,10000, + 8,BUFFER_SIZE - SAFETY_MARGIN, &rprcnt,&rdrcnt, param,NULL, &rparam,&rdata)) -- cgit