From dc1921810e4af260c6312c7708fcf64dfcf3d4bb Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Tue, 26 Sep 2017 23:22:45 -0700 Subject: [PATCH] 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 --- bluetooth/1.0/default/test/bluetooth_address_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bluetooth/1.0/default/test/bluetooth_address_test.cc b/bluetooth/1.0/default/test/bluetooth_address_test.cc index e60729e8af..2c8dbe5b5d 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 @@ class BluetoothAddressTest : public ::testing::Test { 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);