commit | 84816ec99d4e4833268ed66b3709376d37ebb27d | [log] [tgz] |
---|---|---|
author | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | Fri Jul 07 20:43:39 2023 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Fri Jul 07 20:43:39 2023 +0000 |
tree | a4c3d8b6a2f3b9faad65840f26a66e13fc336d08 | |
parent | 4491c5c06e88ac49eab59ed1ec604103484f929c [diff] | |
parent | 3f76bf5b23e518aec7799e03a981e1251ebe2363 [diff] |
Merge "Clarify null-termination of name field" into main am: 8328cbb343 am: b47a11c1d5 am: 3f76bf5b23 Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2651037 Change-Id: I8840b5f4925bd801ddf4b39940b6b6246631176b 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;