1
0
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:
Alexander Bokovoy -
parent 3c89393e29
commit cf0285f3ea

View File

@ -219,7 +219,7 @@ static BOOL recycle_create_dir(vfs_handle_struct *handle, const char *dname)
ALLOC_CHECK(tmp_str, done);
tok_str = tmp_str;
len = strlen(dname);
len = strlen(dname)+1;
new_dir = (char *)malloc(len + 1);
ALLOC_CHECK(new_dir, done);
*new_dir = '\0';