> > + if (dev->setup_index >= sizeof(dev->data_buf) || > > + dev->setup_len >= sizeof(dev->data_buf)) { > > + return -EINVAL; > > + } > > return 0; > > } > > (2) Shouldn't we be checking for setup_index and setup_len > being negative as well?
Oops, they are signed, so yes, I guess we should. Or we can just make them unsigned, they should never ever be negative. But I'm not fully sure we can do that without breaking migration ... cheers, Gerd