mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-23 05:51:11 +01:00
zfsboot: vdev_read_pad2 does allocate buffer with wrong size
vdev_read_pad2() does read VDEV_PAD_SIZE of data, and will copy size bytes of it, hence, we need buffer of VDEV_PAD_SIZE bytes. Issue introduced in r357497. Reported by: se
This commit is contained in:
parent
a1746b2583
commit
7503958e4c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=357569
@ -324,7 +324,7 @@ vdev_read_pad2(vdev_t *vdev, char *buf, size_t size)
|
||||
if (size > VDEV_PAD_SIZE)
|
||||
size = VDEV_PAD_SIZE;
|
||||
|
||||
tmp = malloc(size);
|
||||
tmp = malloc(VDEV_PAD_SIZE);
|
||||
if (tmp == NULL)
|
||||
return (ENOMEM);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user