commit | 4b4820db4b83875ec5bbae11e468f36f21e5334c | [log] [tgz] |
---|---|---|
author | Adam Lesinski <adamlesinski@google.com> | Wed May 13 03:38:35 2015 +0000 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Wed May 13 03:38:36 2015 +0000 |
tree | 66c2c92aeaf1fadec54ca396aebf46a8ab6e37d3 | |
parent | 48cb8310e267d177856ad9b2af7b9949d7d62424 [diff] | |
parent | eaac99a7172da52a76ba48c26413778a74951b1a [diff] |
Merge "Verify that the native handle was created" into mnc-dev
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp index 1b197a4..015866b 100644 --- a/libs/binder/Parcel.cpp +++ b/libs/binder/Parcel.cpp
@@ -1347,6 +1347,10 @@ if (err != NO_ERROR) return 0; native_handle* h = native_handle_create(numFds, numInts); + if (!h) { + return 0; + } + for (int i=0 ; err==NO_ERROR && i<numFds ; i++) { h->data[i] = dup(readFileDescriptor()); if (h->data[i] < 0) err = BAD_VALUE;