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