diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2011-06-04 11:19:19 +0300 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-10-25 09:18:58 -0400 |
commit | 891dea4f00c44cda9a3437da45683d96db69a33c (patch) | |
tree | 10422eb40eed7ec0c5f6363aa932860a389c0f1a /mkfs.c | |
parent | 545b52c2fa77614ad460f2a7f5943632dce6052e (diff) |
mkfs.btrfs: return some defined value instead of garbage when lookup checksum
==31873== Command: ./mkfs.btrfs -r /some/root/
==31873== Parent PID: 31872
==31873==
==31873== Conditional jump or move depends on uninitialised value(s)
==31873== at 0x42C3D0: add_file_items (mkfs.c:792)
==31873== by 0x42CAB3: traverse_directory (mkfs.c:948)
==31873== by 0x42CF11: make_image (mkfs.c:1047)
==31873== by 0x42DE53: main (mkfs.c:1401)
==31873== Uninitialised value was created by a stack allocation
==31873== at 0x41B1B1: btrfs_csum_file_block (file-item.c:195)
'ret' value was not initialized for 'found' branch.
The same fix sits in kernel:
> commit 639cb58675ce9b507eed9c3d6b3335488079b21a
> Author: Chris Mason <chris.mason@oracle.com>
> Date: Thu Aug 28 06:15:25 2008 -0400
>
> Btrfs: Fix variable init during csum creation
>
> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Signed-off-by: Hugo Mills <hugo@carfax.org.uk>
Diffstat (limited to 'mkfs.c')
0 files changed, 0 insertions, 0 deletions