Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:15-SP4
lvm2
bug-1181319_05-cov-check-sscanf-result.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bug-1181319_05-cov-check-sscanf-result.patch of Package lvm2
From 740d5bf6cd39015aac086ddca98a089ba6028d72 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac <zkabelac@redhat.com> Date: Sat, 12 Sep 2020 13:03:07 +0200 Subject: [PATCH] cov: check sscanf result --- daemons/lvmlockd/lvmlockd-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemons/lvmlockd/lvmlockd-core.c b/daemons/lvmlockd/lvmlockd-core.c index a0803de39400..fea8ee6cf83f 100644 --- a/daemons/lvmlockd/lvmlockd-core.c +++ b/daemons/lvmlockd/lvmlockd-core.c @@ -887,8 +887,8 @@ static int read_adopt_file(struct list_head *vg_lockd) continue; else if (!strncmp(adopt_line, "lvmlockd", 8)) { unsigned int v_major = 0, v_minor = 0; - sscanf(adopt_line, "lvmlockd adopt_version %u.%u", &v_major, &v_minor); - if (v_major != ADOPT_VERSION_MAJOR) + if ((sscanf(adopt_line, "lvmlockd adopt_version %u.%u", &v_major, &v_minor) != 2) || + (v_major != ADOPT_VERSION_MAJOR)) goto fail; } else if (!strncmp(adopt_line, "VG:", 3)) { -- 1.8.3.1
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