Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:15-SP2
util-linux
util-linux-canonicalize-coverity-scan.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File util-linux-canonicalize-coverity-scan.patch of Package util-linux
From 0ed52c662eea74f4c8a6d926f601a3c77fa3ff69 Mon Sep 17 00:00:00 2001 From: Karel Zak <kzak@redhat.com> Date: Tue, 14 May 2019 15:47:02 +0200 Subject: [PATCH] lib/canonicalize: verify DM paths [coverity scan] Now the code only checks that /sys/.../dm/name exists, but never verify the device node in /dev (because path prefix is never NULL). The prefix is used to redirect hardcoded paths to /sys dumps (e.g. lsblk regression tests, etc.) This bug has been introduced in v2.33. Fortunately, it's probably no big issue as /dev is always in sync with /sys (thanks to udevd). Signed-off-by: Karel Zak <kzak@redhat.com> --- lib/canonicalize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/canonicalize.c b/lib/canonicalize.c index fe10495..e8d170c 100644 --- a/lib/canonicalize.c +++ b/lib/canonicalize.c @@ -47,7 +47,7 @@ char *__canonicalize_dm_name(const char *prefix, const char *ptname) name[sz - 1] = '\0'; snprintf(path, sizeof(path), _PATH_DEV_MAPPER "/%s", name); - if (prefix || access(path, F_OK) == 0) + if ((prefix && *prefix) || access(path, F_OK) == 0) res = strdup(path); } fclose(f); -- 2.24.0
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