Fix problem found with host bionic fortify checks
hardware/interfaces/bluetooth/1.0/default/test/bluetooth_address_test.cc:59:39:
error: 'open' called with O_CREAT or O_TMPFILE, but missing mode
Bug: 31559095
Test: out/host/linux-x86/nativetest{,64}/bluetooth-address-unit-tests/bluetooth-address-unit-tests
Change-Id: I913c78e25eccaecf8830f1caf8e92f834ab8bb76
diff --git a/bluetooth/1.0/default/test/bluetooth_address_test.cc b/bluetooth/1.0/default/test/bluetooth_address_test.cc
index e60729e..2c8dbe5 100644
--- a/bluetooth/1.0/default/test/bluetooth_address_test.cc
+++ b/bluetooth/1.0/default/test/bluetooth_address_test.cc
@@ -56,7 +56,7 @@
void BluetoothAddressTest::FileWriteString(const char* path,
const char* string) {
- int fd = open(path, O_CREAT | O_RDWR);
+ int fd = open(path, O_CREAT | O_RDWR, 0600);
EXPECT_TRUE(fd > 0) << "err = " << strerror(errno);
size_t length = strlen(string);