[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: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user