[lvm-devel] [PATCH 4/5] Fix theoretical usage of NULL pointer dereference

Alasdair G Kergon agk at redhat.com
Tue Oct 26 13:37:43 UTC 2010


On Tue, Oct 26, 2010 at 02:59:25PM +0200, Zdenek Kabelac wrote:
> @@ -97,6 +97,12 @@ int ttree_insert(struct ttree *tt, unsigned int *key, void *data)

> +	if (!*c) {
> +		log_error(INTERNAL_ERROR "Insert failed.");

What am I missing here?
Isn't that condition you are proposing to add logically impossible to
trigger?!

It's not our job to add code just because a particular static analyser
isn't clever enough to understand the logic.

Nack.

Alasdair




More information about the lvm-devel mailing list