Skip to content

Commit 1a609bc

Browse files
committed
Post-rebase fixups
1 parent c9102a2 commit 1a609bc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/native/mono/monodroid/embedded-assemblies-zip.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,10 @@ EmbeddedAssemblies::zip_load_entries (int fd, const char *apk_name, [[maybe_unus
371371
.max_assembly_file_name_size = 0u,
372372
};
373373

374+
std::unique_ptr<uint8_t[]> raw_data (new uint8_t[cd_size]);
375+
std::span<uint8_t> buf (raw_data.get (), cd_size);
374376
ssize_t nread = read (fd, buf.data (), buf.size ());
375-
if (static_cast<size_t>(nread) != cd_size) {
377+
if (static_cast<size_t>(nread) != cd_size) [[unlikely]] {
376378
Helpers::abort_application (
377379
LOG_ASSEMBLY,
378380
std::format (

0 commit comments

Comments
 (0)