summaryrefslogtreecommitdiffstats
path: root/ldid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ldid.cpp')
-rw-r--r--ldid.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/ldid.cpp b/ldid.cpp
index 08ac3a3..1f9287c 100644
--- a/ldid.cpp
+++ b/ldid.cpp
@@ -1220,9 +1220,11 @@ static void Allocate(const void *idata, size_t isize, std::streambuf &output, co
if (symtab != NULL) {
auto end(mach_header.Swap(symtab->stroff) + mach_header.Swap(symtab->strsize));
- _assert(end <= size);
- _assert(end >= size - 0x10);
- size = end;
+ if (symtab->stroff != 0 || symtab->strsize != 0) {
+ _assert(end <= size);
+ _assert(end >= size - 0x10);
+ size = end;
+ }
}
size_t alloc(allocate(mach_header, size));