ANDROID: binder: re-order some conditions
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 29 Mar 2018 09:14:40 +0000 (12:14 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Apr 2018 10:14:37 +0000 (12:14 +0200)
commit361f2ddbb0c9f9b4f336025a7bd0212cea4a34f0
tree148d33131fd6ce99220d633e5d0a7a6941d0ac6f
parent6d08b06e67cd117f6992c46611dfb4ce267cd71e
ANDROID: binder: re-order some conditions

It doesn't make any difference to runtime but I've switched these two
checks to make my static checker happy.

The problem is that "buffer->data_size" is user controlled and if it's
less than "sizeo(*hdr)" then that means "offset" can be more than
"buffer->data_size".  It's just cleaner to check it in the other order.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Martijn Coenen <maco@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/android/binder.c