[PATCH 1/5] Check type is not NULL before access
Alasdair G Kergon <[email protected]>
| Newsgroups | dev.linux.lists.lvm-devel |
|---|---|
| Message-ID | <[email protected]> |
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