Skip to content

Commit eb883a6

Browse files
authored
Merge pull request #7526 from tautschnig/bugfixes/array-widths
Make is_osx_mach_header declaration and definition consistent
2 parents 9f55b59 + 38d60bd commit eb883a6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/goto-programs/osx_fat_reader.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ osx_fat_readert::osx_fat_readert(
8585
if(!in)
8686
throw system_exceptiont("failed to read OSX fat header");
8787

88-
if(!is_osx_fat_header(reinterpret_cast<char *>(&(fh.magic))))
88+
static_assert(sizeof(fh) >= 8, "fat_header is at least 8 bytes");
89+
if(!is_osx_fat_header(reinterpret_cast<char *>(&fh)))
8990
throw deserialization_exceptiont("OSX fat header malformed");
9091

9192
static_assert(

src/goto-programs/osx_fat_reader.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,6 @@ class osx_mach_o_readert
7474
void process_sections_64(uint32_t nsects, bool need_swap);
7575
};
7676

77-
bool is_osx_mach_object(char hdr[8]);
77+
bool is_osx_mach_object(char hdr[4]);
7878

7979
#endif // CPROVER_GOTO_PROGRAMS_OSX_FAT_READER_H

0 commit comments

Comments
 (0)