commit | 87533581be3036652bf80a3ba8360bd833c6eacb | [log] [tgz] |
---|---|---|
author | George Burgess IV <gbiv@google.com> | Wed Aug 02 14:00:53 2017 -0700 |
committer | George Burgess IV <gbiv@google.com> | Wed Aug 02 14:11:25 2017 -0700 |
tree | 96785b26278272c91db94dcaf78e2ce6da6447ce | |
parent | ceb7814c8650c9dd1031ad6085d2ddb80914b6a9 [diff] |
libappfuse: use an explicit buffer size This patch makes lookup_name use an explicit buffer size, rather than "whatever the union happens to give me." I don't know if it's the correct size, but having a 0-length array in this sort of configuration seems fragile, and will be a compilation error when https://android-review.googlesource.com/#/c/platform/bionic/+/449363/ goes in. Bug: 12231437 Test: Builds with the mentioned patch applied to Bionic Change-Id: I5793c906b7c2417e9a58aa907ef11c282027edb2
diff --git a/libappfuse/include/libappfuse/FuseBuffer.h b/libappfuse/include/libappfuse/FuseBuffer.h index 7abd2fa..959dde7 100644 --- a/libappfuse/include/libappfuse/FuseBuffer.h +++ b/libappfuse/include/libappfuse/FuseBuffer.h
@@ -54,7 +54,7 @@ // for FUSE_READ fuse_read_in read_in; // for FUSE_LOOKUP - char lookup_name[0]; + char lookup_name[kFuseMaxWrite]; }; void Reset(uint32_t data_length, uint32_t opcode, uint64_t unique); };