1
0
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:
Volker Lendecke 2009-01-25 20:32:59 +01:00
parent c0fea1f0f7
commit 28b7c44de8

View File

@ -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
*/