Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 95018434 authored by Jean-Francois Moine's avatar Jean-Francois Moine Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (13875): gspca - vc032x: Fix a possible crash with the vc0321 bridge.



The frame pointer returned by get_i_frame may be NULL when the application
is too slow.

Signed-off-by: default avatarJean-Francois Moine <moinejf@free.fr>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent c60503c1
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3009,6 +3009,10 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
		int l;

		frame = gspca_get_i_frame(gspca_dev);
		if (frame == NULL) {
			gspca_dev->last_packet_type = DISCARD_PACKET;
			return;
		}
		l = frame->data_end - frame->data;
		if (len > frame->v4l2_buf.length - l)
			len = frame->v4l2_buf.length - l;