--- darwinxref/plugins/register.c.orig 2013-10-16 16:25:16.000000000 -0700 +++ darwinxref/plugins/register.c 2017-05-21 10:34:04.000000000 -0700 @@ -340,7 +340,7 @@ // sections immediately follow the dylib_command structure, and are // reflected in the cmdsize. - int strsize = dylib->cmdsize - sizeof(struct dylib_command); + unsigned long int strsize = dylib->cmdsize - sizeof(struct dylib_command); char* str = malloc(strsize+1); strncpy(str, (char*)((uint8_t*)dylib + dylib->dylib.name.offset), strsize); str[strsize] = 0; // NUL-terminate @@ -361,7 +361,7 @@ // sections immediately follow the dylib_command structure, and are // reflected in the cmdsize. - int strsize = dylinker->cmdsize - sizeof(struct dylinker_command); + unsigned long int strsize = dylinker->cmdsize - sizeof(struct dylinker_command); char* str = malloc(strsize+1); strncpy(str, (char*)((uint8_t*)dylinker + dylinker->name.offset), strsize); str[strsize] = 0; // NUL-terminate @@ -381,7 +381,7 @@ if (swap) swap_symtab_command(symtab, NXHostByteOrder()); nsyms = symtab->nsyms; - uint32_t symsize = nsyms * (mh64 ? sizeof(struct nlist_64) : sizeof(struct nlist)); + unsigned long int symsize = nsyms * (mh64 ? sizeof(struct nlist_64) : sizeof(struct nlist)); symbols = malloc(symsize); strsize = symtab->strsize;