Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:15-SP6
nvme-cli.15716
0004-ioctl-Fix-double-free-in-a-loop-of-get_pro...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0004-ioctl-Fix-double-free-in-a-loop-of-get_property.patch of Package nvme-cli.15716
From 8347e51a1635fbdc90123bf3cd143e67f386af5d Mon Sep 17 00:00:00 2001 From: Minwoo Im <minwoo.im@samsung.com> Date: Wed, 24 Apr 2019 01:46:29 +0100 Subject: [PATCH 1/3] ioctl: Fix double-free in a loop of get_property As it was reported, *pbar could be double-freed in case get_property_helper() fails in the middle of the loop. This issue was reported by Ken Heitke on: https://github.com/linux-nvme/nvme-cli/pull/471 Git-commit: d16e1d2784a48c9b25e58a0e821c737670c6cdc8 References: bsc#1173561 Signed-off-by: Minwoo Im <minwoo.im@samsung.com> --- nvme-ioctl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nvme-ioctl.c b/nvme-ioctl.c index dbd8843..f56c710 100644 --- a/nvme-ioctl.c +++ b/nvme-ioctl.c @@ -626,8 +626,10 @@ int nvme_get_properties(int fd, void **pbar) err = get_property_helper(fd, offset, *pbar + offset, &advance); if (!err) ret = 0; - else + else { free(*pbar); + break; + } } return ret; -- 2.13.7
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor