From 87533581be3036652bf80a3ba8360bd833c6eacb Mon Sep 17 00:00:00 2001 From: George Burgess IV Date: Wed, 2 Aug 2017 14:00:53 -0700 Subject: [PATCH] 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 --- libappfuse/include/libappfuse/FuseBuffer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libappfuse/include/libappfuse/FuseBuffer.h b/libappfuse/include/libappfuse/FuseBuffer.h index 7abd2fa40..959dde798 100644 --- a/libappfuse/include/libappfuse/FuseBuffer.h +++ b/libappfuse/include/libappfuse/FuseBuffer.h @@ -54,7 +54,7 @@ struct FuseRequest : public FuseMessage { // 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); };