Commit 3208e45
cx231xx-audio: fix NULL-deref at probe
commit 65f921647f4c89a2068478c89691f39b309b58f7 upstream.
Make sure to check the number of endpoints to avoid dereferencing a
NULL-pointer or accessing memory beyond the endpoint array should a
malicious device lack the expected endpoints.
Fixes: e0d3baf ("V4L/DVB (10954): Add cx231xx USB driver")
Cc: Sri Deevi <Srinivasa.Deevi@conexant.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent bd14c18 commit 3208e45
1 file changed
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
698 | 698 | | |
699 | 699 | | |
700 | 700 | | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
701 | 706 | | |
702 | 707 | | |
703 | 708 | | |
| |||
713 | 718 | | |
714 | 719 | | |
715 | 720 | | |
716 | | - | |
717 | | - | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
718 | 729 | | |
719 | 730 | | |
720 | 731 | | |
| |||
725 | 736 | | |
726 | 737 | | |
727 | 738 | | |
| 739 | + | |
| 740 | + | |
728 | 741 | | |
729 | 742 | | |
730 | 743 | | |
| |||
0 commit comments