diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 8351c5638880b..7017102a3a5fe 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -2486,6 +2486,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",