summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/android/binder.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index 574324c2ae07..0eafc8440773 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -2717,6 +2717,9 @@ static int binder_translate_fd_array(struct list_head *pf_head,
struct binder_proc *proc = thread->proc;
int ret;
+ if (fda->num_fds == 0)
+ return 0;
+
fd_buf_size = sizeof(u32) * fda->num_fds;
if (fda->num_fds >= SIZE_MAX / sizeof(u32)) {
binder_user_error("%d:%d got transaction with invalid number of fds (%lld)\n",