summaryrefslogtreecommitdiff
path: root/source3/client/client.c
diff options
context:
space:
mode:
authorSamba Release Account <samba-bugs@samba.org>1997-08-25 22:18:31 +0000
committerSamba Release Account <samba-bugs@samba.org>1997-08-25 22:18:31 +0000
commit4c319ad04699b236d038d141323c7586c5bf0983 (patch)
treee85e919682939b98a0ba8c3fc4e27f9c77e9af91 /source3/client/client.c
parent57d9e2b794f2121432d690539f481776ecce1262 (diff)
downloadsamba-4c319ad04699b236d038d141323c7586c5bf0983.tar.gz
samba-4c319ad04699b236d038d141323c7586c5bf0983.tar.bz2
samba-4c319ad04699b236d038d141323c7586c5bf0983.zip
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)
Diffstat (limited to 'source3/client/client.c')
-rw-r--r--source3/client/client.c9
1 files changed, 5 insertions, 4 deletions
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))