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