The C standard does not allow for comparing incompatible pointer types
with each other. This causes the C compiler to emit a warning when we
try to compare a pointer of type `struct zzip_disk64_trailer` (cast to
`void *`) with a pointer of type `unsigned char`.
Fix this by comparing `p + sizeof(trailer)` with `buffer + mapsize`
instead of using the cast struct.
errno = EFBIG;
goto error2;
}
- if ((void*)(trailer + 1) > (buffer + mapsize))
+ if ((p + sizeof(*trailer)) > (buffer + mapsize))
{
debug1("disk64 trailer is not complete");
errno = EBADMSG;