Loading libs/androidfw/CursorWindow.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -188,9 +188,9 @@ status_t CursorWindow::createFromParcel(Parcel* parcel, CursorWindow** outWindow goto fail_silent; } if (window->mSize > 0) { window->mData = malloc(window->mSize); if (!window->mData) goto fail; if (window->mSize > 0) { if (parcel->read(window->mData, window->mSize)) goto fail; } } Loading libs/androidfw/include/androidfw/CursorWindow.h +5 −0 Original line number Diff line number Diff line Loading @@ -154,6 +154,11 @@ private: String8 mName; std::optional<android::base::MappedFile> mMappedFile; int mAshmemFd = -1; /** * Pointer to the start of the memory region, either mmap'ed from ashmem, or malloc'ed. * Must not be null after full initialization even for an empty window, as many getters perform * pointer arithmetic on it without null checks for performance reasons. */ void* mData = nullptr; /** * Pointer to the first FieldSlot, used to optimize the extremely Loading Loading
libs/androidfw/CursorWindow.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -188,9 +188,9 @@ status_t CursorWindow::createFromParcel(Parcel* parcel, CursorWindow** outWindow goto fail_silent; } if (window->mSize > 0) { window->mData = malloc(window->mSize); if (!window->mData) goto fail; if (window->mSize > 0) { if (parcel->read(window->mData, window->mSize)) goto fail; } } Loading
libs/androidfw/include/androidfw/CursorWindow.h +5 −0 Original line number Diff line number Diff line Loading @@ -154,6 +154,11 @@ private: String8 mName; std::optional<android::base::MappedFile> mMappedFile; int mAshmemFd = -1; /** * Pointer to the start of the memory region, either mmap'ed from ashmem, or malloc'ed. * Must not be null after full initialization even for an empty window, as many getters perform * pointer arithmetic on it without null checks for performance reasons. */ void* mData = nullptr; /** * Pointer to the first FieldSlot, used to optimize the extremely Loading