From: Zdenek Kabelac Date: Mon, 13 Feb 2012 14:17:04 +0000 (+0000) Subject: Make sure dereferenced words[0] and words[1] are defined X-Git-Tag: v2_02_96~413 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=5e4f2349184f73a3c215844d1e6d2c71b7d26dd8;p=lvm2.git Make sure dereferenced words[0] and words[1] are defined --- diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM index 4da95deed..0f598c6d4 100644 --- a/WHATS_NEW_DM +++ b/WHATS_NEW_DM @@ -1,5 +1,6 @@ Version 1.02.71 - ==================================== + Test for parsed words in _umount() dmeventd snapshot plugin. Fix memory leak in fail path of parse_loop_device_name() in dmsetup. Check for missing reply_uuid in dm_event_get_registered_device(). Check for allocation failure in dmeventd restart(). diff --git a/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c b/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c index 18fa39047..0c59e340a 100644 --- a/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c +++ b/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c @@ -144,7 +144,8 @@ static void _umount(const char *device, int major, int minor) break; /* eof, likely */ /* words[0] is the mount point and words[1] is the device path */ - dm_split_words(buffer, 3, 0, words); + if (dm_split_words(buffer, 3, 0, words) < 2) + continue; /* find the major/minor of the device */ if (stat(words[0], &st))