[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [lvm-devel] [PATCH 1/5] Check type is not NULL before access



On Tue, Oct 26, 2010 at 02:59:22PM +0200, Zdenek Kabelac wrote:
> Check type before dereference and report internal error in case
> it's undefined and return from the function.
 
> +			if (!type) {
> +				log_error(INTERNAL_ERROR "Type is not defined.");
> +				return;
> +			}

Is this one really an internal library error?

Can it be triggered if someone usees the API incorrectly?

If so, it should be treated like validation.

Alasdair


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]