Obviously the last attempt wasn't enough. Now we do really only read the first
byte in the address buffer which on little endian transmission does always
contain the address family (MS-NRPC 2.2.1.2.4.1).
This should now be working platform-independently.
if (r->in.addresses[i].size < sizeof(sa_family_t)) {
continue;
}
- /* the first two byte of the buffer are the "sin_family" */
- sin_family = (sa_family_t) *r->in.addresses[i].buffer;
+ /* The first two byte of the buffer are reserved for the
+ * "sin_family" but for now only the first one is used. */
+ sin_family = r->in.addresses[i].buffer[0];
switch (sin_family) {
case AF_INET: