Re: [PATCH][next] media: allegro: fix potential null dereference on header

2020-07-22 Thread Michael Tretter
On Mon, 20 Jul 2020 17:38:04 +0100, Colin King wrote: > From: Colin Ian King > > The pointer header is an alias to msg and msg is being null checked. > However, if msg is null then header is also null and this can lead to > a null pointer dereference on the assignment type = header->type. Fix > t

[PATCH][next] media: allegro: fix potential null dereference on header

2020-07-20 Thread Colin King
From: Colin Ian King The pointer header is an alias to msg and msg is being null checked. However, if msg is null then header is also null and this can lead to a null pointer dereference on the assignment type = header->type. Fix this by only dereferencing header after the null check on msg. Add