[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[linux-lvm] uninitialized pointer deref upon failed mirror addition
- From: Jim Meyering <jim meyering net>
- To: LVM general discussion and development <linux-lvm redhat com>
- Subject: [linux-lvm] uninitialized pointer deref upon failed mirror addition
- Date: Fri, 13 Jun 2008 12:45:09 +0200
While preparing an unrelated patch, I saw this warning go by,
so went and looked:
metadata/mirror.c: In function 'add_mirror_images':
metadata/mirror.c:1347: warning: 'log_lv' may be used uninitialized in this function
It turns out that it is a legitimate warning, indeed,
and an uninitialized log_lv will be dereferenced if any
of the "goto out_remove_log;" statements is reached with
log_count == 0 (aka log_lv uninitialized).
If someone can tell me precisely how to exercise one of the offending
code paths, I'll try to make time to write a test script that'd be run
via "make check".
Here's a proposed (but untested) fix.
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]