Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Alexander_Naumov:SLE-12:Update
xfsdump
0001-xfsdump-avoid-segfault-in-partial_reg-in-e...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-xfsdump-avoid-segfault-in-partial_reg-in-error-case.patch of Package xfsdump
From 1162bdbcff77ed2341f0a9294db76df80f2f36a3 Mon Sep 17 00:00:00 2001 From: Eric Sandeen <sandeen@sandeen.net> Date: Tue, 8 Oct 2013 22:05:54 +0000 Subject: [PATCH] xfsdump: avoid segfault in partial_reg() in error case If we go down the "/* Should never get here. */" path in partial_reg(), we issue a warning but then continue with the function. This calls pi_unlock() twice, but worse, uses a null isptr: if ( ! isptr ) { ... isptr is never set if we get to ... /* Should never get here. */ pi_unlock(); ... } ... /* Update this drive's entry */ bsptr = &isptr->is_bs[d_index]; if (bsptr->endoffset == 0) { >From all appearances, because we unlock on that "never get here" path, it should just be returning after printing the warning. So add that, and we avoid the segfault. The previous fix to partial_reg() should prevent us from hitting this in the first place. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com> Signed-off-by: Rich Johnston <rjohnston@sgi.com> --- restore/content.c | 1 + 1 file changed, 1 insertion(+) diff --git a/restore/content.c b/restore/content.c index 54d933c..cc49336 100644 --- a/restore/content.c +++ b/restore/content.c @@ -9007,6 +9007,7 @@ partial_reg( ix_t d_index, #ifdef DEBUGPARTIALS dump_partials(); #endif + return; } found: -- 2.16.3
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