diff options
author | Colin Ian King <[email protected]> | 2020-07-22 15:09:03 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <[email protected]> | 2020-08-06 11:28:04 +0200 |
commit | 04320b3ef90bef04df6672e3a98a266b88c35b55 (patch) | |
tree | 01cb6666e1b8a07a41c6d128303441f234f6ac11 /lib/test_overflow.c | |
parent | dd4eddc4ba31fbf4554fc5fa12d3a553b50e1469 (diff) |
media: allegro: fix potential null dereference on header
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 just using header->type after the null check and removing the need
for type as it is only used once.
Addresses-Coverity: ("Dereference before null check")
Fixes: 3de16839669f ("media: allegro: add explicit mail encoding and decoding")
Signed-off-by: Colin Ian King <[email protected]>
Reviewed-by: Michael Tretter <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions