From 9da358d6d3d8b12e27b45c1581d0c2ad978f1f83 Mon Sep 17 00:00:00 2001 From: Evgenii Stepanov Date: Wed, 15 May 2019 18:45:01 -0700 Subject: [PATCH] Initialize all fields of struct iocb. Kernel does not accept non-zero value of iocb->aio_reserved2. Bug: 132803232 Test: initialize malloc() memory to non-zero pattern and see what breaks Change-Id: I65a7e89e3a2c1ba79df1dc2d011d6c76c41afb81 (cherry picked from commit fe7eca7b8fba6770ad36cadb4d89c87385f17451) --- adb/daemon/usb.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adb/daemon/usb.cpp b/adb/daemon/usb.cpp index 0fc4512c0..565a3647e 100644 --- a/adb/daemon/usb.cpp +++ b/adb/daemon/usb.cpp @@ -117,7 +117,7 @@ struct TransferId { struct IoBlock { bool pending = false; - struct iocb control; + struct iocb control = {}; std::shared_ptr payload; TransferId id() const { return TransferId::from_value(control.aio_data); }