mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
s3: VFS: shadow_copy2: Fix length comparison to ensure we don't overstep a length.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12531 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
This commit is contained in:
parent
979e39252b
commit
37ef8d3f65
@ -2588,7 +2588,7 @@ static int shadow_copy2_connect(struct vfs_handle_struct *handle,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (config->rel_connectpath == NULL &&
|
if (config->rel_connectpath == NULL &&
|
||||||
strlen(basedir) != strlen(handle->conn->connectpath)) {
|
strlen(basedir) < strlen(handle->conn->connectpath)) {
|
||||||
config->rel_connectpath = talloc_strdup(config,
|
config->rel_connectpath = talloc_strdup(config,
|
||||||
handle->conn->connectpath + strlen(basedir));
|
handle->conn->connectpath + strlen(basedir));
|
||||||
if (config->rel_connectpath == NULL) {
|
if (config->rel_connectpath == NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user