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

[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
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment