--- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -2486,6 +2486,9 @@ static int binder_translate_fd_array(str 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",