We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9f55b59 + 38d60bd commit eb883a6Copy full SHA for eb883a6
src/goto-programs/osx_fat_reader.cpp
@@ -85,7 +85,8 @@ osx_fat_readert::osx_fat_readert(
85
if(!in)
86
throw system_exceptiont("failed to read OSX fat header");
87
88
- if(!is_osx_fat_header(reinterpret_cast<char *>(&(fh.magic))))
+ static_assert(sizeof(fh) >= 8, "fat_header is at least 8 bytes");
89
+ if(!is_osx_fat_header(reinterpret_cast<char *>(&fh)))
90
throw deserialization_exceptiont("OSX fat header malformed");
91
92
static_assert(
src/goto-programs/osx_fat_reader.h
@@ -74,6 +74,6 @@ class osx_mach_o_readert
74
void process_sections_64(uint32_t nsects, bool need_swap);
75
};
76
77
-bool is_osx_mach_object(char hdr[8]);
+bool is_osx_mach_object(char hdr[4]);
78
79
#endif // CPROVER_GOTO_PROGRAMS_OSX_FAT_READER_H
0 commit comments