summaryrefslogtreecommitdiff
path: root/source3/libsmb/clifile.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-01-26 18:14:41 +0100
committerJelmer Vernooij <jelmer@samba.org>2009-01-26 18:14:41 +0100
commitcce04c606e7a91fcaf75c8efd7ca0cd4aa15ece9 (patch)
tree62f598c7a01e072cc52d166364bc3d2a94e85242 /source3/libsmb/clifile.c
parentd30b6af9532c0ea4e9610b30d13e7a4d9b763834 (diff)
parentd8f15e4efc00b9d509ff5761e9ca8ff5c6f443f7 (diff)
downloadsamba-cce04c606e7a91fcaf75c8efd7ca0cd4aa15ece9.tar.gz
samba-cce04c606e7a91fcaf75c8efd7ca0cd4aa15ece9.tar.bz2
samba-cce04c606e7a91fcaf75c8efd7ca0cd4aa15ece9.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source3/libsmb/clifile.c')
-rw-r--r--source3/libsmb/clifile.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index 7c75826414..02cd2108bf 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -783,10 +783,15 @@ int cli_nt_create(struct cli_state *cli, const char *fname, uint32 DesiredAccess
uint8_t *smb_bytes_push_str(uint8_t *buf, bool ucs2, const char *str)
{
- size_t buflen = talloc_get_size(buf);
+ size_t buflen;
char *converted;
size_t converted_size;
+ if (buf == NULL) {
+ return NULL;
+ }
+
+ buflen = talloc_get_size(buf);
/*
* We're pushing into an SMB buffer, align odd
*/
@@ -809,6 +814,7 @@ uint8_t *smb_bytes_push_str(uint8_t *buf, bool ucs2, const char *str)
buf = TALLOC_REALLOC_ARRAY(NULL, buf, uint8_t,
buflen + converted_size);
if (buf == NULL) {
+ TALLOC_FREE(converted);
return NULL;
}
@@ -1745,7 +1751,7 @@ int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path)
if (!path2) {
return -1;
}
- clistr_pull(cli, path2, p,
+ clistr_pull(cli->inbuf, path2, p,
len+1, len, STR_ASCII);
*tmp_path = path2;
}