summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2025-03-14 12:43:57 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2025-03-14 12:43:57 -0700
commit367dcef16bc9c0f5fba55eda5f6cb39ec55c0373 (patch)
treec53d658d0b0519d68ed98a03914f60deec96afeb
parent87ae0365b9f784fe29f0c3079c20d4d050a47e78 (diff)
parent9dc64621d896d05fcb0e6f45792a307fde130823 (diff)
Merge "Zero-initialize CursorWindow buffer" into main
-rw-r--r--libs/androidfw/CursorWindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/androidfw/CursorWindow.cpp b/libs/androidfw/CursorWindow.cpp
index a592749c5398..6e11d430c5ea 100644
--- a/libs/androidfw/CursorWindow.cpp
+++ b/libs/androidfw/CursorWindow.cpp
@@ -55,7 +55,7 @@ status_t CursorWindow::create(const String8 &name, size_t inflatedSize, CursorWi
window->mName = name;
window->mSize = std::min(kInlineSize, inflatedSize);
window->mInflatedSize = inflatedSize;
- window->mData = malloc(window->mSize);
+ window->mData = calloc(window->mSize, 1);
if (!window->mData) goto fail;
window->mReadOnly = false;