commit | b47a11c1d549168fd0937648e38a9f8beb3ae1c7 | [log] [tgz] |
---|---|---|
author | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | Fri Jul 07 19:21:58 2023 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Fri Jul 07 19:21:58 2023 +0000 |
tree | 5541a173814042ce95c03420bcd8a8f5bf5ea810 | |
parent | 3a4100ec403c74ed0323a665ad0fcb94d5026f92 [diff] | |
parent | 8328cbb3436304cab20076dc6af9cd6e2c84a91c [diff] |
Merge "Clarify null-termination of name field" into main am: 8328cbb343 Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2651037 Change-Id: I0be35741621afcefa20221a757c74d5cb53501e1 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/graphics/allocator/aidl/android/hardware/graphics/allocator/BufferDescriptorInfo.aidl b/graphics/allocator/aidl/android/hardware/graphics/allocator/BufferDescriptorInfo.aidl index 50aa2b7..7194ebe 100644 --- a/graphics/allocator/aidl/android/hardware/graphics/allocator/BufferDescriptorInfo.aidl +++ b/graphics/allocator/aidl/android/hardware/graphics/allocator/BufferDescriptorInfo.aidl
@@ -23,7 +23,14 @@ @VintfStability parcelable BufferDescriptorInfo { /** - * The name of the buffer in ASCII. Useful for debugging/tracing. + * The name of the buffer in null-terminated ASCII. Useful for debugging/tracing. + * + * NOTE: While a well behaved client will ensure it passes a null-terminated string + * within the 128-byte limit, the IAllocator service implementation should be + * be defensive against malformed input. As such, it is recommended that + * IAllocator implementations proactively do `name[127] = 0` upon receiving + * an allocation request to enusre that the string is definitely + * null-terminated regardless of what the client sent. */ byte[128] name;