mirror of
https://github.com/samba-team/samba.git
synced 2025-02-04 17:47:26 +03:00
Fix string overflow due to wrong size calculation
This commit is contained in:
parent
3c89393e29
commit
cf0285f3ea
@ -219,7 +219,7 @@ static BOOL recycle_create_dir(vfs_handle_struct *handle, const char *dname)
|
|||||||
ALLOC_CHECK(tmp_str, done);
|
ALLOC_CHECK(tmp_str, done);
|
||||||
tok_str = tmp_str;
|
tok_str = tmp_str;
|
||||||
|
|
||||||
len = strlen(dname);
|
len = strlen(dname)+1;
|
||||||
new_dir = (char *)malloc(len + 1);
|
new_dir = (char *)malloc(len + 1);
|
||||||
ALLOC_CHECK(new_dir, done);
|
ALLOC_CHECK(new_dir, done);
|
||||||
*new_dir = '\0';
|
*new_dir = '\0';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user