git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c0fea1f
)
Make smb_bytes_push_str deal with a NULL buf returning NULL
author
Volker Lendecke
<vl@samba.org>
Sun, 25 Jan 2009 19:32:59 +0000
(20:32 +0100)
committer
Volker Lendecke
<vl@samba.org>
Sun, 25 Jan 2009 19:52:39 +0000
(20:52 +0100)
source3/libsmb/clifile.c
patch
|
blob
|
history
diff --git
a/source3/libsmb/clifile.c
b/source3/libsmb/clifile.c
index 7c75826414146248623b672a37c64fa1f470bd55..04bbabe0874e568eca62aefa2ee24d3a63e01a2f 100644
(file)
--- 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
*/