Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:Update
qemu.5922
0244-9pfs-fail-local_statfs-earlier.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0244-9pfs-fail-local_statfs-earlier.patch of Package qemu.5922
From d26cd8b4dccb5245f772b6ea31a9591dc3b7ca62 Mon Sep 17 00:00:00 2001 From: Greg Kurz <groug@kaod.org> Date: Mon, 6 Mar 2017 17:34:01 +0100 Subject: [PATCH] 9pfs: fail local_statfs() earlier MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If we cannot open the given path, we can return right away instead of passing -1 to fstatfs() and close(). This will make Coverity happy. (Coverity issue CID1371729) Signed-off-by: Greg Kurz <groug@kaod.org> Reviewed-by: Daniel P. berrange <berrange@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> (cherry picked from commit 23da0145cc4be66fdb1033f951dbbf140f457896) [BR: Fix and/or infrastructure for BSC#1020427 CVE-2016-9602] Signed-off-by: Bruce Rogers <brogers@suse.com> --- hw/9pfs/9p-local.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c index d58b7567d6..5d57283de9 100644 --- a/hw/9pfs/9p-local.c +++ b/hw/9pfs/9p-local.c @@ -1049,6 +1049,9 @@ static int local_statfs(FsContext *s, V9fsPath *fs_path, struct statfs *stbuf) int fd, ret; fd = local_open_nofollow(s, fs_path->data, O_RDONLY, 0); + if (fd == -1) { + return -1; + } ret = fstatfs(fd, stbuf); close_preserve_errno(fd); return ret;
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