summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-01-26 22:22:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:51:31 -0500
commit662a58bded5b1766dc40d099b7279936ae027e76 (patch)
tree7dc47a47520a78a60f179f64cec685d7b984a977 /source4
parentaf772ebe88d74f5fcbc3f9f7e69078332cd33700 (diff)
downloadsamba-662a58bded5b1766dc40d099b7279936ae027e76.tar.gz
samba-662a58bded5b1766dc40d099b7279936ae027e76.tar.bz2
samba-662a58bded5b1766dc40d099b7279936ae027e76.zip
r13170: Remove some dependencies on -1 implying the size of pstring
(This used to be commit f7c28d31481f6479f258cd878d173cbc42ed9de0)
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/ntlmssp/ntlmssp_parse.c10
-rw-r--r--source4/torture/basic/scanner.c6
2 files changed, 7 insertions, 9 deletions
diff --git a/source4/auth/ntlmssp/ntlmssp_parse.c b/source4/auth/ntlmssp/ntlmssp_parse.c
index e8c08bf650..4fbfede350 100644
--- a/source4/auth/ntlmssp/ntlmssp_parse.c
+++ b/source4/auth/ntlmssp/ntlmssp_parse.c
@@ -238,9 +238,8 @@ BOOL msrpc_parse(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob,
return False;
if (0 < len1) {
- pull_string(p, blob->data + ptr, sizeof(p),
- len1,
- STR_UNICODE|STR_NOALIGN);
+ pull_ucs2(p, blob->data + ptr, sizeof(p),
+ len1, STR_NOALIGN);
(*ps) = talloc_strdup(mem_ctx, p);
if (!(*ps)) {
return False;
@@ -269,9 +268,8 @@ BOOL msrpc_parse(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob,
return False;
if (0 < len1) {
- pull_string(p, blob->data + ptr, sizeof(p),
- len1,
- STR_ASCII|STR_NOALIGN);
+ pull_ascii(p, blob->data + ptr, sizeof(p),
+ len1, STR_NOALIGN);
(*ps) = talloc_strdup(mem_ctx, p);
if (!(*ps)) {
return False;
diff --git a/source4/torture/basic/scanner.c b/source4/torture/basic/scanner.c
index 6e79745e89..92de78e7af 100644
--- a/source4/torture/basic/scanner.c
+++ b/source4/torture/basic/scanner.c
@@ -448,7 +448,7 @@ static BOOL scan_nttrans(struct smbcli_state *cli, int op, int level,
SSVAL(param, 0, level);
SSVAL(param, 2, 0);
SSVAL(param, 4, 0);
- param_len += push_string(&param[6], fname, -1, STR_TERMINATE | STR_UNICODE);
+ param_len += push_string(&param[6], fname, sizeof(pstring), STR_TERMINATE | STR_UNICODE);
status = try_nttrans_len(cli, "fname", op, level, param, data, param_len, &data_len,
&rparam_len, &rdata_len);
@@ -459,7 +459,7 @@ static BOOL scan_nttrans(struct smbcli_state *cli, int op, int level,
SSVAL(param, 0, level);
SSVAL(param, 2, 0);
SSVAL(param, 4, 0);
- param_len += push_string(&param[6], "\\newfile.dat", -1, STR_TERMINATE | STR_UNICODE);
+ param_len += push_string(&param[6], "\\newfile.dat", sizeof(pstring), STR_TERMINATE | STR_UNICODE);
status = try_nttrans_len(cli, "newfile", op, level, param, data, param_len, &data_len,
&rparam_len, &rdata_len);
@@ -471,7 +471,7 @@ static BOOL scan_nttrans(struct smbcli_state *cli, int op, int level,
smbcli_mkdir(cli->tree, "\\testdir");
param_len = 2;
SSVAL(param, 0, level);
- param_len += push_string(&param[2], "\\testdir", -1, STR_TERMINATE | STR_UNICODE);
+ param_len += push_string(&param[2], "\\testdir", sizeof(pstring), STR_TERMINATE | STR_UNICODE);
status = try_nttrans_len(cli, "dfs", op, level, param, data, param_len, &data_len,
&rparam_len, &rdata_len);