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

Commit 2e158d45 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

[media] pvrusb2: don't go past buf array



That fixes the following smatch warning:
	drivers/media/usb/pvrusb2/pvrusb2-hdw.c:4909 pvr2_hdw_state_log_state() error: buffer overflow 'buf' 256 <= 4294967294

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 19409c89
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -4903,6 +4903,9 @@ static void pvr2_hdw_state_log_state(struct pvr2_hdw *hdw)
		printk(KERN_INFO "%s %.*s\n",hdw->name,ccnt,buf);
	}
	ccnt = pvr2_hdw_report_clients(hdw, buf, sizeof(buf));
	if (ccnt >= sizeof(buf))
		ccnt = sizeof(buf);

	ucnt = 0;
	while (ucnt < ccnt) {
		lcnt = 0;