This leads to the IOCTL failing in case the new structure format is used
with it. Also fixes bounds checking for the old format.
Signed-off-by: Imre Deak <imre.deak@nokia.com>
PVRSRV_BRIDGE_ASSERT_CMD(ui32BridgeID, PVRSRV_BRIDGE_SGX_DOKICK);
max_3dstat_vals = SGX_MAX_3D_STATUS_VALS;
- if (unlikely(in_size) != sizeof(*psDoKickIN)) {
+ if (unlikely(in_size != sizeof(*psDoKickIN))) {
max_3dstat_vals = SGX_MAX_3D_STATUS_VALS_OLD;
if (kick_compat_conv(psDoKickIN, in_size) != 0) {
psRetOUT->eError = PVRSRV_ERROR_INVALID_PARAMS;
return 0;
}
- if (psDoKickIN->sCCBKick.ui32Num3DStatusVals > SGX_MAX_3D_STATUS_VALS) {
+ if (psDoKickIN->sCCBKick.ui32Num3DStatusVals > max_3dstat_vals) {
psRetOUT->eError = PVRSRV_ERROR_INVALID_PARAMS;
return 0;
}