summaryrefslogtreecommitdiff
path: root/source3/client/smbmount.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-08-31 03:11:42 +0000
committerAndrew Tridgell <tridge@samba.org>1998-08-31 03:11:42 +0000
commit61b5fd6f32e9ccb612df1354a3e3b3bed5f2b808 (patch)
tree06d72234112a52e30d5b72e367e42efc43e9762f /source3/client/smbmount.c
parentab4577f141b0c08a543d998a36892bbafae4e902 (diff)
downloadsamba-61b5fd6f32e9ccb612df1354a3e3b3bed5f2b808.tar.gz
samba-61b5fd6f32e9ccb612df1354a3e3b3bed5f2b808.tar.bz2
samba-61b5fd6f32e9ccb612df1354a3e3b3bed5f2b808.zip
bounds check next_token() to prevent possible buffer overflows
(This used to be commit 3eade55dc7c842bdc50205c330802d211fae54d3)
Diffstat (limited to 'source3/client/smbmount.c')
-rw-r--r--source3/client/smbmount.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/client/smbmount.c b/source3/client/smbmount.c
index 9bc7cba6f6..95aeecde3c 100644
--- a/source3/client/smbmount.c
+++ b/source3/client/smbmount.c
@@ -326,7 +326,7 @@ static void cmd_mount(char *inbuf,char *outbuf)
int retval;
char mount_point[MAXPATHLEN+1];
- if (!next_token(NULL, mpoint, NULL))
+ if (!next_token(NULL, mpoint, NULL, sizeof(mpoint)))
{
DEBUG(0,("You must supply a mount point\n"));
return;
@@ -350,7 +350,7 @@ static void cmd_mount(char *inbuf,char *outbuf)
slprintf(mount_command, sizeof(mount_command)-1,"smbmnt %s -s %s", mount_point, share_name);
- while(next_token(NULL, buf, NULL))
+ while(next_token(NULL, buf, NULL, sizeof(buf)))
{
pstrcat(mount_command, " ");
pstrcat(mount_command, buf);
@@ -429,7 +429,7 @@ void cmd_help(char *dum_in, char *dum_out)
int i=0,j;
fstring buf;
- if (next_token(NULL,buf,NULL))
+ if (next_token(NULL,buf,NULL,sizeof(buf)))
{
if ((i = process_tok(buf)) >= 0)
DEBUG(0,("HELP %s:\n\t%s\n\n",commands[i].name,commands[i].description));
@@ -527,7 +527,7 @@ static BOOL process(char *base_directory)
/* and get the first part of the command */
{
char *ptr = line;
- if (!next_token(&ptr,tok,NULL)) continue;
+ if (!next_token(&ptr,tok,NULL,sizeof(tok))) continue;
}
if ((i = process_tok(tok)) >= 0)
@@ -567,7 +567,7 @@ static BOOL process(char *base_directory)
/* and get the first part of the command */
{
char *ptr = line;
- if (!next_token(&ptr,tok,NULL)) continue;
+ if (!next_token(&ptr,tok,NULL,sizeof(tok))) continue;
}
if ((i = process_tok(tok)) >= 0)