diff options
author | Mathias Agopian <mathias@google.com> | 2009-08-04 20:53:59 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2009-08-05 12:22:30 -0700 |
commit | 3eded949243c8d331190d3803b5c5c2bf2a058fc (patch) | |
tree | a93a55378f5b03426ee7822b7d2304775a2eed9c | |
parent | 591018aaf9e95b9d2f6d9742194e940605b1bffa (diff) | |
download | frameworks_native-3eded949243c8d331190d3803b5c5c2bf2a058fc.zip frameworks_native-3eded949243c8d331190d3803b5c5c2bf2a058fc.tar.gz frameworks_native-3eded949243c8d331190d3803b5c5c2bf2a058fc.tar.bz2 |
don't crash when SurfaceBuffer::writeToParcel is given a null argument
-rw-r--r-- | libs/ui/Surface.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/ui/Surface.cpp b/libs/ui/Surface.cpp index a4710aa..c73909f 100644 --- a/libs/ui/Surface.cpp +++ b/libs/ui/Surface.cpp @@ -108,6 +108,9 @@ status_t SurfaceBuffer::unlock() status_t SurfaceBuffer::writeToParcel(Parcel* reply, android_native_buffer_t const* buffer) { + if (buffer == NULL) { + return BAD_VALUE; + } reply->writeInt32(buffer->width); reply->writeInt32(buffer->height); reply->writeInt32(buffer->stride); |