If not running on a powerpc platform the bmc_mac pointer remains NULL.
If this is the case set an address of zero when serialising rather
than dereferencing the pointer.
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
pos += pb_protocol_serialise_string(pos, bd_info->mountpoint);
}
- memcpy(pos, sysinfo->bmc_mac, HWADDR_SIZE);
+ if (sysinfo->bmc_mac)
+ memcpy(pos, sysinfo->bmc_mac, HWADDR_SIZE);
+ else
+ memset(pos, 0, HWADDR_SIZE);
pos += HWADDR_SIZE;
assert(pos <= buf + buf_len);