mirror of
https://git.openafs.org/openafs.git
synced 2025-02-01 05:57:43 +00:00
volser: don't derefernce null pointer in copyVnodes()
split_volume() can call copyVnodes() with parVnode == NULL, so guard the one reference to parVnode (a memcpy()) to avoid a fault. Change-Id: I631a78bcfa6a7a465e997a6714849ca0d2d86f86 Reviewed-on: http://gerrit.openafs.org/7769 Reviewed-by: Derrick Brashear <shadow@dementix.org> Tested-by: BuildBot <buildbot@rampaginggeek.com>
This commit is contained in:
parent
d2d591caf2
commit
3af6beea4b
@ -375,6 +375,7 @@ afs_int32 copyVnodes(struct Msg *m, Volume *vol, Volume *newvol,
|
|||||||
code = EIO;
|
code = EIO;
|
||||||
goto Bad_Copy;
|
goto Bad_Copy;
|
||||||
}
|
}
|
||||||
|
if (parVnode != NULL)
|
||||||
memcpy(parVnode, vnode, sizeof(struct VnodeDiskObject));
|
memcpy(parVnode, vnode, sizeof(struct VnodeDiskObject));
|
||||||
}
|
}
|
||||||
if (e->flag & NEEDED && e->vN != where) {
|
if (e->flag & NEEDED && e->vN != where) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user