Fix string overflow due to wrong size calculation
authorAlexander Bokovoy <ab@samba.org>
Fri, 12 Mar 2004 11:21:50 +0000 (11:21 +0000)
committerAlexander Bokovoy <ab@samba.org>
Fri, 12 Mar 2004 11:21:50 +0000 (11:21 +0000)
(This used to be commit e1d0b8fc7bbe075dd817e3816f29640cda980732)

source3/modules/vfs_recycle.c

index 9b31f6afb950bfe073fbc9d5c2d15a0ca830a57f..1cb1cb327b49f29a4b9a72dac7ce3a0b63e8994f 100644 (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';