libbrillo: Disable ResizeTest when asan is used.

ResizeTest intentationally does an oob access in vector.
Asan complains about this so just disable the test when
asan is used.

BUG=chromium:806013
TEST=libbrillo unit tests pass with asan.

Change-Id: I6abc2ffa30f8ffc6ecb64d89c7857f584d0ec9af
Reviewed-on: https://chromium-review.googlesource.com/889659
Commit-Ready: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
diff --git a/brillo/secure_blob_unittest.cc b/brillo/secure_blob_unittest.cc
index d4fd555..f68ac24 100644
--- a/brillo/secure_blob_unittest.cc
+++ b/brillo/secure_blob_unittest.cc
@@ -76,6 +76,13 @@
   EXPECT_TRUE(SecureBlobTest::FindBlobInBlob(from_blob, blob));
 }
 
+// Disable ResizeTest with address sanitizer.
+// https://crbug.com/806013
+#if defined(__has_feature) && __has_feature(address_sanitizer)
+#define BRILLO_DISABLE_RESIZETEST 1
+#endif
+
+#ifndef BRILLO_DISABLE_RESIZETEST
 TEST_F(SecureBlobTest, ResizeTest) {
   // Check that resizing a SecureBlob wipes the excess memory.  The test assumes
   // that resize() down by one will not re-allocate the memory, so the last byte
@@ -93,6 +100,7 @@
   EXPECT_EQ(length - 1, blob.size());
   EXPECT_EQ(0, blob.data()[length - 1]);
 }
+#endif
 
 TEST_F(SecureBlobTest, CombineTest) {
   SecureBlob blob1(32);