Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Alexander_Naumov:SLE12
btrfsprogs
0052-btrfs-progs-Fix-malloc-size-for-superblock...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0052-btrfs-progs-Fix-malloc-size-for-superblock.patch of Package btrfsprogs
From cb699bd5724a63471ad21e4d79022d06ea3637a1 Mon Sep 17 00:00:00 2001 From: Qu Wenruo <quwenruo@cn.fujitsu.com> Date: Thu, 3 Jul 2014 17:36:38 +0800 Subject: [PATCH 74/88] btrfs-progs: Fix malloc size for superblock. recover_prepare() in chunk-recover.c alloc memory which only contains sizeof(struct btrfs_super_block). This will cause glibc malloc error after superblock csum is calculated. Use BTRFS_SUPER_INFO_SIZE to fix the bug. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz> --- chunk-recover.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chunk-recover.c b/chunk-recover.c index b638ada6c4a3..b342fa75d9b6 100644 --- a/chunk-recover.c +++ b/chunk-recover.c @@ -1340,7 +1340,7 @@ static int recover_prepare(struct recover_control *rc, char *path) return -1; } - sb = malloc(sizeof(struct btrfs_super_block)); + sb = malloc(BTRFS_SUPER_INFO_SIZE); if (!sb) { fprintf(stderr, "allocating memory for sb failed.\n"); ret = -ENOMEM; -- 1.9.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