mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
Make smb_bytes_push_str deal with a NULL buf returning NULL
This commit is contained in:
parent
c0fea1f0f7
commit
28b7c44de8
@ -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
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user